cant login... error
This commit is contained in:
+5
-1
@@ -28,7 +28,11 @@ export const { handlers, auth, signIn, signOut } = NextAuth({
|
||||
// In a real application, you MUST hash and salt passwords.
|
||||
const passwordsMatch = password === user.password;
|
||||
|
||||
if (passwordsMatch) return user;
|
||||
if (passwordsMatch) {
|
||||
// The user object returned here will be encoded in the JWT.
|
||||
return { id: user.id, name: user.name, email: user.email };
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user