CallbackRouteError when handling custom API response messages in Credentials provider #12420
Unanswered
ItisBardiaMar
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Expected Behavior
When using the Credentials provider with external API verification:
Should be able to handle the API response message (e.g., "otp incorrect") and display it to the user.
Error handling should preserve the original API error message.
Current Behavior
I am encountering the following error:
Where "otp incorrect" comes from the API response:
Documentation Reference:
According to the documentation, a CallbackRouteError occurs when the user cannot finish login. For the Credentials provider, this can happen when:
The authorize method threw an uncaught error.
The signIn or jwt callback methods threw an uncaught error.
Code :
Beta Was this translation helpful? Give feedback.
All reactions