fix(providers): add issuer to GitHub provider for RFC 9207 compliance#13410
fix(providers): add issuer to GitHub provider for RFC 9207 compliance#13410Bekacru merged 1 commit intonextauthjs:mainfrom
Conversation
GitHub recently implemented RFC 9207 by returning an 'iss' parameter in OAuth callbacks. The openid-client library validates this parameter unconditionally, breaking authentication for apps that don't configure an issuer. This fix adds issuer configuration to both standard GitHub and GitHub Enterprise Server, ensuring RFC 9207 compatibility. Fixes: langfuse/langfuse#13091
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
@Vinay152003 is attempting to deploy a commit to the authjs Team on Vercel. A member of the Team first needs to authorize it. |
|
I love the use of the base URL here so that it can also work for GHE-DR and GHES instances as well as github.com. Thanks for submitting this fix! For the maintainers - once the issuer is merged into next-auth, I'll want to include a link to the next release in our changelog announcement so that folks can pick up the update. We can't ship the issuer parameter in the authz code response until this is fixed. As is, any app that doesn't update to the next release of next-auth will break if they are using GitHub auth once we do ship the feature. I'm hoping to re-release the feature in 2-3 weeks - does that work with your release cadence and the usual rate at which folks pick them up? (Also this fixes #13409) |
|
@Bekacru there should be a corresponding fix in v4 stable as well and a release of both (v4 and v5.beta) |
Yeah should be released early this week |
|
@panva thanks, will do |
Summary
Adds RFC 9207 (OAuth 2.0 Authorization Server Issuer Identification) compatibility to the GitHub provider by configuring the issuer value that GitHub now returns in OAuth callbacks.
Problem
GitHub recently implemented RFC 9207 by silently returning an
iss=https://github.com/login/oauthparameter in OAuth callback responses (April 6-10, 2026). Theopenid-clientlibrary validates this parameter unconditionally, and without an configured issuer, it throws:This breaks GitHub OAuth sign-in for all applications using this provider.
Solution
Add
issuer: \to the GitHub provider configuration. This works for both:issuer: "https://github.com/login/oauth"issuer: \(dynamically derived)Changes
packages/core/src/providers/github.tsReferences
Test Plan
Fixes: langfuse/langfuse#13091