How to handle oauth callback errors #8209
Unanswered
kirkegaard
asked this question in
Help
Replies: 2 comments 1 reply
-
Still nothing on this? Is there really no way to access callback error details? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I really need this one. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Our oauth service does a few checks on our users and will return an error code based on the current status of the user. Say a user is blocked the oauth service will return
{ error: "USER_BLOCKED" }
or ratherhttp://localhost/api/auth/callback/{provider}?error=USER_BLOCKED
. However nextauth seems to swallow errors and return a default error likehttp://localhost/auth/login?callbackUrl=http%3A%2F%2Flocalhost%2Fauth%2Flogin&error=Callback#_=_
which is not useable for us. I rather have/auth/login?error=USER_BLOCKED
.Just found this issue and it looks a lot like the same we're experiencing. But its a quite old issue so..
#1819
An example of the log when a user cancels a signin. How can i access
error_description
or forward it to the frontend?The only way ive found to actually catch the error is by hijacking the requests to nextauth like below, but it seems veeeery hacky. Is there no other way?
Beta Was this translation helpful? Give feedback.
All reactions