[PR #5993] fix(oidc-provider): implement proper OIDC prompt parameter handling #14615

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

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

State: closed
Merged: Yes


Fixes: https://github.com/better-auth/better-auth/issues/4594


Summary by cubic

Implements spec-compliant OIDC prompt and max_age handling, fixes silent login/consent behavior, and prevents unintended redirects after OIDC flows.

  • Bug Fixes

    • prompt=none: return login_required when unauthenticated; consent_required when consent is needed; otherwise proceed without UI.
    • max_age: treat 0 as prompt=login and require reauth when session age exceeds max_age.
    • Clear oidc_login_prompt cookie after resuming flow so later normal logins don’t redirect to the OIDC client.
  • New Features

    • Added parsePrompt utility with validation (none cannot be combined) and tests.
    • Introduced OIDCProviderError/InvalidRequest, broadened prompt type, and resumed flow after login by stripping prompt=login before re-authorizing.

Written for commit cd8effe79c. Summary will update automatically on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5993 **State:** closed **Merged:** Yes --- Fixes: https://github.com/better-auth/better-auth/issues/4594 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Implements spec-compliant OIDC prompt and max_age handling, fixes silent login/consent behavior, and prevents unintended redirects after OIDC flows. - **Bug Fixes** - prompt=none: return login_required when unauthenticated; consent_required when consent is needed; otherwise proceed without UI. - max_age: treat 0 as prompt=login and require reauth when session age exceeds max_age. - Clear oidc_login_prompt cookie after resuming flow so later normal logins don’t redirect to the OIDC client. - **New Features** - Added parsePrompt utility with validation (none cannot be combined) and tests. - Introduced OIDCProviderError/InvalidRequest, broadened prompt type, and resumed flow after login by stripping prompt=login before re-authorizing. <sup>Written for commit cd8effe79ce7486dad2196e234d55e0b89ff018d. 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:32:34 -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#14615