mcp-auth-proxy icon indicating copy to clipboard operation
mcp-auth-proxy copied to clipboard

fix(auth): return 400 and hide internal errors on auth callback failures

Open paulojmdias opened this issue 6 months ago • 0 comments

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

paulojmdias avatar May 28 '26 16:05 paulojmdias