Allow only certain users to login #2253
-
Hello! Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
balazsorban44
Jun 25, 2021
Replies: 1 comment 1 reply
-
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 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
balazsorban44
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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