[PR #8554] fix(oauth-provider): support prompt=none #16305

Closed
opened 2026-04-13 10:29:19 -05:00 by GiteaMirror · 0 comments
Owner

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

State: closed
Merged: Yes


Support prompt=none internally. Provides proper error codes as specified in OIDC Spec. Adds appropriate tests to authorize.test.ts, oauth.test.ts, and metadata.test.ts.

Closes: #7700, #8423
Replaces: #8544, #8550


Summary by cubic

Adds OIDC-compliant support for prompt=none in oauth-provider, returning the correct error codes and updating discovery metadata. This enables silent auth checks without redirecting users to UI pages.

  • New Features
    • Authorize endpoint now returns:
      • login_required when the user is not authenticated
      • consent_required when consent is missing
      • account_selection_required when account selection is needed
      • interaction_required when signup or post-login is required
    • No UI redirects when prompt=none; responses redirect back to redirect_uri with error, state, and iss.
    • Discovery metadata now includes "none" in prompt_values_supported.
    • Tests added for unauthenticated, consent, account selection, post-login, and metadata cases.

Written for commit 5751da3039. Summary will update on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/8554 **State:** closed **Merged:** Yes --- Support `prompt=none` internally. Provides proper error codes as specified in [OIDC Spec](https://openid.net/specs/openid-connect-core-1_0.html#AuthError). Adds appropriate tests to authorize.test.ts, oauth.test.ts, and metadata.test.ts. Closes: #7700, #8423 Replaces: #8544, #8550 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds OIDC-compliant support for `prompt=none` in `oauth-provider`, returning the correct error codes and updating discovery metadata. This enables silent auth checks without redirecting users to UI pages. - **New Features** - Authorize endpoint now returns: - `login_required` when the user is not authenticated - `consent_required` when consent is missing - `account_selection_required` when account selection is needed - `interaction_required` when signup or post-login is required - No UI redirects when `prompt=none`; responses redirect back to `redirect_uri` with `error`, `state`, and `iss`. - Discovery metadata now includes `"none"` in `prompt_values_supported`. - Tests added for unauthenticated, consent, account selection, post-login, and metadata cases. <sup>Written for commit 5751da3039c753cc7785011628a53275261038b7. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 10:29:19 -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#16305