Skip to content

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

Closed
lebrosoft wants to merge 1 commit intobetter-auth:mainfrom
lebrosoft:canary
Closed

fix issue: after oidc client successfully signin use better-auth oaut…#7280
lebrosoft wants to merge 1 commit intobetter-auth:mainfrom
lebrosoft:canary

Conversation

@lebrosoft
Copy link
Copy Markdown

@lebrosoft lebrosoft commented Jan 12, 2026

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 0867f4b. Summary will update on new commits.

…h 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'.
@vercel
Copy link
Copy Markdown

vercel bot commented Jan 12, 2026

@lebrosoft is attempting to deploy a commit to the better-auth Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Jan 12, 2026

Open in StackBlitz

better-auth

npm i https://pkg.pr.new/better-auth/better-auth@7280

@better-auth/cli

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/cli@7280

@better-auth/core

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/core@7280

@better-auth/expo

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/expo@7280

@better-auth/oauth-provider

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/oauth-provider@7280

@better-auth/passkey

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/passkey@7280

@better-auth/scim

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/scim@7280

@better-auth/sso

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/sso@7280

@better-auth/stripe

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/stripe@7280

@better-auth/telemetry

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/telemetry@7280

commit: 0867f4b

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@himself65 himself65 force-pushed the canary branch 4 times, most recently from 85f5056 to 5de9704 Compare January 21, 2026 01:28
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working identity OAuth/OIDC provider, MCP, device flow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants