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.
|
// In a real application, you MUST hash and salt passwords.
|
||||||
const passwordsMatch = password === user.password;
|
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) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
return null
|
return null
|
||||||
|
|||||||
Reference in New Issue
Block a user