Skip to content
Discussion options

You must be logged in to vote

The authorize option in the Credentials provider can be used to return null or return a rejected Promise.

You can also reject it with an Error object or by returning a url as a string.

The following are all valid ways to reject a sign in attempt from the Credentials provider:

  • Promise.resolve(null)
  • Promise.reject(new Error('Invalid Credentials'))
  • Promise.reject('/signin?error=invalid_credentials')

This is documented here https://next-auth.js.org/providers/credentials

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
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
1 participant
Converted from issue

This discussion was converted from issue #618 on December 07, 2020 17:06.