You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I return null, the caller always get CallbackRouteError error
I already found the issue, but need you guys to fix it.
in your code auth/core/src/lib/actions/callback/index.ts you throw CredentialsSignin() which extends Error. However in the logic of catch of this error, you will wrapper any error which doesn't extends AuthError with CallbackRouteError. I think you need to fix it to extends AuthError. I paste some picture of this code below
How to reproduce
Actually I found this issue in the official tutorial project - next.js dashboard
Just login with any email & password, it always return the same error. This is because I can't get the accurate error type from your auth SDK.
Expected behavior
Make the error correct & accurate
The text was updated successfully, but these errors were encountered:
TUTUBIG
added
bug
Something isn't working
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
labels
Jun 13, 2024
TUTUBIG
changed the title
next.js sdk can't get the correct error type of credentials provider
Simple Mistake - Easy FIX next.js sdk can't get the correct error type of credentials provider
Jun 13, 2024
Yeah thanks, so the idea was actually to provide another error class to extend for custom credentialErrors that doesnt extend AuthError, because that would end up with our messaging appended to the error.messgae, which users didn't want.
Looks like we just have to also not wrap that one here. I'll take a look shortly
Environment
Reproduction URL
https://github.com/TUTUBIG/nextJs-dashboard
Describe the issue
I already found the issue, but need you guys to fix it.
in your code
auth/core/src/lib/actions/callback/index.ts
you throwCredentialsSignin()
which extendsError
. However in the logic of catch of this error, you will wrapper any error which doesn't extendsAuthError
withCallbackRouteError
. I think you need to fix it to extendsAuthError
. I paste some picture of this code belowHow to reproduce
Actually I found this issue in the official tutorial project - next.js dashboard
Just login with any email & password, it always return the same error. This is because I can't get the accurate error type from your auth SDK.
Expected behavior
Make the error correct & accurate
The text was updated successfully, but these errors were encountered: