-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[auth][error] CallbackRouteError #11428
Comments
version related to #11074 |
thanx @Pierozi! But it still throws an exception with Actually looking at #11074 and related code reveals the real problem: Using exceptions for control flow is a miserable decision and newbie error for a long time. It is such an easy DoS vector, that it makes next-auth everything else but enterprise ready. So IMHO the bug should be tagged as security problem, too, because this way it is so easy to stop a system from working or at least hurt its performance in a significant way. BTW: Wondering, why an exception gets thrown at all (or not caught by next-auth). Wrong passwords should be expected (could by simple typos, etc.) and thus not cause an exception but rather should be handled properly without logging any stack traces. Logging 'wrong password' would be sufficient and give the right advice to developers and app operators to not waste a lot of their valuable/expensive time troubleshooting to diagnose the problem. Last but not least: Is there a release plan alias ETA for 5.x stable? Background: we trying to convert a pages router app with next-auth v4 to and app router app and think, it might be a good idea to switch to v5 because of the announced |
I will not able to provide you more infos about the status of 5.x because it was my first experience with Next-Auth and only last a day.
|
having the same issue using @auth/[email protected] and @hono/[email protected], |
With all due respect, and honestly, a lot of appreciation for what you're doing here with this project, I have to agree with @jelmd. Exceptions are for exceptional situations; database is offline, API calls aren't working, etc. A user inputting invalid credentials is NOT an exceptional situation. It's completely expected. Exceptions should not be used for controlling logic flow. This code should be returning a status code, not throwing an exception. |
Fixed in #11469 |
Quick background info, it was never supposed to be throwing an error that's not caught. I added a new error type for Custom Credential errors to extend from because our builtin |
Thanks for the update!! :) |
i have the same error.i use a chinese custome oauth2.0 provider service.after scan qrcode get the error.after get the
` [NextAuth] Error: {
` id: "wechat",
}; |
Environment
Reproduction URL
https://github.com/jelmd/nextjs-bugs/tree/01_auth/01_auth
Describe the issue
If a signIn fails e.g. because of a wrong password, nextAuth throws the following Error/stacktrace but does not explain, what the real problem is, or what it really expects. Documentation gives also no usable hint, what the problem is:
How to reproduce
Expected behavior
Worked flawless in pages route with next-auth 4.x - so it should with app router and next-auth 5.x.
The text was updated successfully, but these errors were encountered: