Backend review fixes (stages B3/B4): OAuth state cleanup, callback error mapping, MCP arg parsing
- /auth/login and /auth/callback purge expired OAuthState rows
  opportunistically (the table previously only grew)
- /auth/callback maps token-exchange/user-fetch failures to a clean
  502 AppError instead of an unhandled traceback
- legacy MCP adapter parses offset/limit through a bounded clamped
  parser (garbage arguments are 400, not a 500)
- webhook body decodes invalid utf-8 with replacement bytes, which can
  only fail the signature check (401) instead of a 500
- tests: 78 -> 80

Co-Authored-By: Claude Code <noreply@anthropic.com>
1 parent ba31737 commit 12a903037ec3272191d75eb6ed33a5178f127b39
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 22 hours ago
Showing 3 changed files
View
gnexus_creds/mcp.py
View
gnexus_creds/oauth.py
View
tests/test_auth.py