Skip to content

fix(providers): add missing issuer to Discord - #13504

Open
eldrago4 wants to merge 1 commit into
nextauthjs:mainfrom
eldrago4:fix/discord-issuer
Open

eldrago4 wants to merge 1 commit into
nextauthjs:mainfrom
eldrago4:fix/discord-issuer

Conversation

@eldrago4

@eldrago4 eldrago4 commented Oct 7, 2026

Copy link
Copy Markdown

Discord has started sending an RFC 9207 iss parameter on the OAuth callback. Its metadata at https://discord.com/.well-known/oauth-authorization-server now advertises:

"issuer": "https://discord.com",
"authorization_response_iss_parameter_supported": true

The provider has no issuer, so handleOAuth falls back to the https://authjs.dev placeholder and validateAuthResponse rejects the mismatch. Every Discord sign-in fails:

[auth][cause]: unexpected "iss" (issuer) response parameter value
[auth][details]: { "expected": "https://authjs.dev", "provider": "discord" }

Setting issuer fixes it and costs nothing: the token and userinfo URLs are already absolute, so the non-discovery branch is still taken and no extra request is made.

Same failure GitHub caused in April (#13409). This is the same one-line change as #12694, which has been open since Feb 2025 — happy to close this in favour of that one if it gets picked up instead. @panva noted there that the issuer is required for the ID Token path too.

@vercel

vercel Bot commented Oct 7, 2026

Copy link
Copy Markdown

@eldrago4 is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added providers core Refers to `@auth/core` labels Oct 7, 2026
leomotors added a commit to leomotors/chuumai-tools that referenced this pull request Oct 13, 2026
Discord now returns an RFC 9207 `iss` parameter on the authorization
callback. oauth4webapi validates it against the provider issuer, but
the Auth.js Discord provider declares none and falls back to the
"https://authjs.dev" placeholder, so every Discord sign-in failed with
"unexpected iss (issuer) response parameter value".

Upstream fix: nextauthjs/next-auth#13504 (unreleased as of
@auth/core 0.41.3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

core Refers to `@auth/core` providers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant