cant login... error

This commit is contained in:
Leon Serfaty G
2025-09-01 07:05:09 +00:00
parent f2f97ce9f1
commit 8186bd7731
+5 -1
View File
@@ -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