mcp-auth-proxy
mcp-auth-proxy copied to clipboard
fix(auth): return 400 and hide internal errors on auth callback failures
Summary
Auth callback endpoints (/.auth/{oidc,github,google}/callback) returned HTTP 500 and leaked the app name and internal error text (e.g. "OAuth state is missing") to unauthenticated callers.
This patch returns the correct status code (400 for client-side OAuth state errors, 500 only for genuine server faults), renders a generic "Authentication failed" page, and removes the app name from the <title>. Internal errors are preserved in server-side zap logs, so operator debuggability is unchanged. CSRF/state validation is unaffected.
Type of Change
- [X] fix: A bug fix