Skip to content

How to handle a bad login error response with Sign In callback and a custom JWT credential provider #1563

Answered by balazsorban44
pjtf93 asked this question in Help
Discussion options

You must be logged in to vote

You probably want to check out the redirect: false option of the signIn client-side method https://next-auth.js.org/getting-started/client#using-the-redirect-false-option

Just for extra info, the signin callback is supposed to return a boolean, or a string (an url to redirect to in case an error occurs for example) which will cancel the login flow if false or a string.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@MattJustMatt
Comment options

@igorbattaglion
Comment options

@BrianRobertoRocha
Comment options

@MattJustMatt
Comment options

@igorbattaglion
Comment options

Answer selected by balazsorban44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants