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

Closed
opened 2026-04-15 22:39:19 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8554
Author: @dvanmali
Created: 3/11/2026
Status: Merged
Merged: 3/11/2026
Merged by: @himself65

Base: canaryHead: opPromptNone


📝 Commits (1)

  • 5751da3 feat: support prompt=none

📊 Changes

5 files changed (+268 additions, -2 deletions)

View changed files

📝 packages/oauth-provider/src/authorize.test.ts (+76 -0)
📝 packages/oauth-provider/src/authorize.ts (+75 -0)
📝 packages/oauth-provider/src/metadata.test.ts (+7 -1)
📝 packages/oauth-provider/src/metadata.ts (+7 -1)
📝 packages/oauth-provider/src/oauth.test.ts (+103 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/8554 **Author:** [@dvanmali](https://github.com/dvanmali) **Created:** 3/11/2026 **Status:** ✅ Merged **Merged:** 3/11/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `opPromptNone` --- ### 📝 Commits (1) - [`5751da3`](https://github.com/better-auth/better-auth/commit/5751da3039c753cc7785011628a53275261038b7) feat: support prompt=none ### 📊 Changes **5 files changed** (+268 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/oauth-provider/src/authorize.test.ts` (+76 -0) 📝 `packages/oauth-provider/src/authorize.ts` (+75 -0) 📝 `packages/oauth-provider/src/metadata.test.ts` (+7 -1) 📝 `packages/oauth-provider/src/metadata.ts` (+7 -1) 📝 `packages/oauth-provider/src/oauth.test.ts` (+103 -0) </details> ### 📄 Description 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. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 22:39: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#24959