[PR #7280] fix issue: after oidc client successfully signin use better-auth oaut… #7194

Open
opened 2026-03-13 13:27:31 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7280
Author: @lebrosoft
Created: 1/12/2026
Status: 🔄 Open

Base: canaryHead: canary


📝 Commits (1)

  • 0867f4b fix issue: after oidc client successfully signin use better-auth oauth provider authorization server, user cant be redirected back to oidc client page due to error: xxx been blocked by CORS policy: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'.

📊 Changes

1 file changed (+11 additions, -4 deletions)

View changed files

📝 packages/oauth-provider/src/client.ts (+11 -4)

📄 Description

fix issue: after oidc client successfully signin use better-auth oauth provider authorization server, user cant be redirected back to oidc client page due to error: xxx been blocked by CORS policy: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'.

may related issue link


Summary by cubic

Fix redirect after OIDC sign-in with the better-auth OAuth provider by forcing JSON responses during the OAuth flow. This prevents CORS credential errors and lets the client handle redirects safely.

  • Bug Fixes
    • Send Accept: application/json when oauth_query is present on /oauth2/consent and /oauth2/continue.
    • Pass parsed oauth_query in the response body for the client to process signed query params.

Written for commit 0867f4bb09. 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/7280 **Author:** [@lebrosoft](https://github.com/lebrosoft) **Created:** 1/12/2026 **Status:** 🔄 Open **Base:** `canary` ← **Head:** `canary` --- ### 📝 Commits (1) - [`0867f4b`](https://github.com/better-auth/better-auth/commit/0867f4bb09278ff75c187c61a5a2a1072a63499a) fix issue: after oidc client successfully signin use better-auth oauth provider authorization server, user cant be redirected back to oidc client page due to error: xxx been blocked by CORS policy: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. ### 📊 Changes **1 file changed** (+11 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/oauth-provider/src/client.ts` (+11 -4) </details> ### 📄 Description fix issue: after oidc client successfully signin use better-auth oauth provider authorization server, user cant be redirected back to oidc client page due to error: xxx been blocked by CORS policy: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. [may related issue link](https://github.com/better-auth/better-auth/issues/7041) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fix redirect after OIDC sign-in with the better-auth OAuth provider by forcing JSON responses during the OAuth flow. This prevents CORS credential errors and lets the client handle redirects safely. - **Bug Fixes** - Send Accept: application/json when oauth_query is present on /oauth2/consent and /oauth2/continue. - Pass parsed oauth_query in the response body for the client to process signed query params. <sup>Written for commit 0867f4bb09278ff75c187c61a5a2a1072a63499a. 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-03-13 13:27:31 -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#7194