Skip to content

Allow only certain users to login #2253

Answered by balazsorban44
emmarvpol asked this question in Help
Discussion options

You must be logged in to vote

https://next-auth.js.org/configuration/callbacks#sign-in-callback you can use the signIn callback to control access. return true if a user is allowed to sign in, or return false if they are not. optionally you can return a relative path (string) where the unauthorized users will be redirected to

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@emmarvpol
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
2 participants