s/OAUTH_CALLBACK_ERROR/CALLBACK_OAUTH_ERROR/ #5027
Closed
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
There is an inconsistent use of two of the error codes,
OAUTH_CALLBACK_ERROR
andCALLBACK_OAUTH_ERROR
. Especially inroutes/callback.ts
the two sit next to each other and emit subtly discrepant errors. They apparently do not contain asymmetrical information, and practically look interchangeable. But since errors page only mentions the latter, let's align them and make use of it: https://next-auth.js.org/errors#callback_oauth_error. With this fix I hope anybody like me will no longer navigate unfortunately through the different link with a broken anchor.Skimming through the history, I found
OAUTH_CALLBACK_ERROR
had been replaced in #235, reintroduced perhaps accidentally in #332 and #1698. Let me know if I'm missing any context!Below is the like of what I've seen in the log:
🧢 Checklist
🎫 Affected issues
Please scout and link issues that might be solved by this PR.
Fixes: INSERT_ISSUE_LINK_HERE
📌 Resources