-
Notifications
You must be signed in to change notification settings - Fork 4k
fix(errors): do not log authjs message with CredentialsSiginin error #11050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
|
@ndom91 this breaks the logic that redirects these errors to the signin page (see |
Also noticed this, left some more details on this in this comment on the other PR that added |
Kupinaaa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaks types on CredentialsSignin class #11155
| * 2. If you throw this error in a framework that handles form actions server-side, this error is thrown, instead of redirecting the user, so you'll need to handle. | ||
| */ | ||
| export class CredentialsSignin extends SignInError { | ||
| export class CredentialsSignin extends Error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaks types on CredentialsSignin #11155
|
This PR caused a regression and now we are unable to throw custom errors during the sign in mechanism. Is there a plan to address this? I can raise a PR to revert if necessary. |
Thanks for the reminder. Check out my response here: #11155 (comment) I'll take a look at fixing this shortly |
|
Thank you for the prompt response @ndom91! |
Added a test to avoid regression
* fix(core): revert nextauthjs#11050 Added a test to avoid regression * Update callback.test.ts * Update index.ts

☕️ Reasoning
CredentialsSigninerror to useErroras base classerror.messagewhen users extend this class for their own signin errorsReplaces #10231
🧢 Checklist
🎫 Affected issues
📌 Resources