[PR #6116] [MERGED] fix(oidc-provider): redirect to consent when scope changed #23358

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6116
Author: @himself65
Created: 11/20/2025
Status: Merged
Merged: 11/20/2025
Merged by: @Bekacru

Base: canaryHead: himself65/2025/11/19/d


📝 Commits (5)

  • 4b87b8f fix(oidc-provider): redirect to consent when scope changed
  • 94db9f5 fix: remove unused
  • 9540ff5 Update test/unit/oidc/scope-consent.spec.ts
  • 61739d0 Update test/unit/oidc/scope-consent.spec.ts
  • 7684f5f Update test/unit/oidc/scope-consent.spec.ts

📊 Changes

2 files changed (+224 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/plugins/oidc-provider/authorize.ts (+11 -1)
test/unit/oidc/scope-consent.spec.ts (+213 -0)

📄 Description

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


Summary by cubic

Redirects to the OIDC consent page when requested scopes exceed prior consent, and skips consent when scopes are unchanged. Adds unit tests for initial consent, unchanged scopes, and scope expansion to verify redirect behavior.

Written for commit 7684f5f47a. Summary will update automatically 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/6116 **Author:** [@himself65](https://github.com/himself65) **Created:** 11/20/2025 **Status:** ✅ Merged **Merged:** 11/20/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `himself65/2025/11/19/d` --- ### 📝 Commits (5) - [`4b87b8f`](https://github.com/better-auth/better-auth/commit/4b87b8f4dd55cd7cf22899de9bebd7b01c37a660) fix(oidc-provider): redirect to consent when scope changed - [`94db9f5`](https://github.com/better-auth/better-auth/commit/94db9f51be26243eb337193205c41acced00e8fd) fix: remove unused - [`9540ff5`](https://github.com/better-auth/better-auth/commit/9540ff5e28c05c5105cff16daf28b3629f0e5096) Update test/unit/oidc/scope-consent.spec.ts - [`61739d0`](https://github.com/better-auth/better-auth/commit/61739d0f7e0cbd973bb3096c77d7ccf406a5ef16) Update test/unit/oidc/scope-consent.spec.ts - [`7684f5f`](https://github.com/better-auth/better-auth/commit/7684f5f47a0164f43d275632221984e1490c3a39) Update test/unit/oidc/scope-consent.spec.ts ### 📊 Changes **2 files changed** (+224 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/oidc-provider/authorize.ts` (+11 -1) ➕ `test/unit/oidc/scope-consent.spec.ts` (+213 -0) </details> ### 📄 Description Fixes: https://github.com/better-auth/better-auth/issues/5025 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Redirects to the OIDC consent page when requested scopes exceed prior consent, and skips consent when scopes are unchanged. Adds unit tests for initial consent, unchanged scopes, and scope expansion to verify redirect behavior. <sup>Written for commit 7684f5f47a0164f43d275632221984e1490c3a39. Summary will update automatically 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 21:39:38 -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#23358