Skip to content

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

Open
paulojmdias wants to merge 1 commit into
sigbit:mainfrom
paulojmdias:feat/auth_400
Open

fix(auth): return 400 and hide internal errors on auth callback failures#172
paulojmdias wants to merge 1 commit into
sigbit:mainfrom
paulojmdias:feat/auth_400

Conversation

@paulojmdias

Copy link
Copy Markdown

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

  • fix: A bug fix

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
@paulojmdias paulojmdias requested a review from a team as a code owner May 28, 2026 16:06
@paulojmdias paulojmdias requested review from hrntknr and removed request for a team May 28, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant