[PR #5848] fix(odic): case when prompt=login #14522

Closed
opened 2026-04-13 09:31:08 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/5848

State: closed
Merged: Yes


Summary by cubic

Fixes OIDC prompt=login handling to always reauthenticate, prevents redirect loops after login, and adds spec‑compliant prompt parsing. Adds safer cookie parsing and a more robust login redirect URL.

  • Bug Fixes
    • Force reauth when prompt=login or no session; set signed cookie and redirect to the login page.
    • After login, mark oidcLoginPromptHandled to continue authorization without another redirect.
    • Parse and validate prompt per OIDC (login/consent/select_account/none); reject invalid combos with InvalidRequest.
    • Safely parse oidc_login_prompt cookie and preserve query params when redirecting; handle empty query strings.

Written for commit 8d7b28d3d5. Summary will update automatically on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5848 **State:** closed **Merged:** Yes --- <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Fixes OIDC prompt=login handling to always reauthenticate, prevents redirect loops after login, and adds spec‑compliant prompt parsing. Adds safer cookie parsing and a more robust login redirect URL. - **Bug Fixes** - Force reauth when prompt=login or no session; set signed cookie and redirect to the login page. - After login, mark oidcLoginPromptHandled to continue authorization without another redirect. - Parse and validate prompt per OIDC (login/consent/select_account/none); reject invalid combos with InvalidRequest. - Safely parse oidc_login_prompt cookie and preserve query params when redirecting; handle empty query strings. <sup>Written for commit 8d7b28d3d510cf0621b000843d305f55021e37bc. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 09:31:08 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#14522