Improve error validation for Microsoft EntraID provider errors before decoding token#12876
Merged
ThangHuuVu merged 4 commits intonextauthjs:mainfrom Apr 20, 2025
Merged
Improve error validation for Microsoft EntraID provider errors before decoding token#12876ThangHuuVu merged 4 commits intonextauthjs:mainfrom
ThangHuuVu merged 4 commits intonextauthjs:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
|
@kwilcz is attempting to deploy a commit to the authjs Team on Vercel. A member of the Team first needs to authorize it. |
ThangHuuVu
approved these changes
Apr 20, 2025
Member
|
thank you, LGTM! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12876 +/- ##
==========================================
- Coverage 39.57% 39.55% -0.02%
==========================================
Files 199 199
Lines 31400 31410 +10
Branches 1373 1379 +6
==========================================
Hits 12425 12425
- Misses 18975 18985 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
☕️ Reasoning
Microsoft Entra ID & Entra External ID are returning OAuth errors in the response body for token requests.
See: https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow#error-response-1
The change made in this PR will allow developers to at least know what is the real source of the issue instead of misguiding to the incorrect JWT token.
Before:
After:
🧢 Checklist
🎫 Affected issues
Not fixed, but related due to increased difficulty to review errors:
#12702
#12186
#12187
#12560
#12400
📌 Resources