Something went wrong.
This commit is contained in:
Leon Serfaty G
2025-09-01 07:06:07 +00:00
parent 3f81366c91
commit 0b065d4e25
4 changed files with 13 additions and 20 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+1 -3
View File
@@ -1,8 +1,6 @@
import { handlers, auth, signIn, signOut } from '@/auth';
import { handlers } from '@/auth';
export const { GET, POST } = handlers;
export { auth, signIn, signOut };
export const runtime = "nodejs";
+1 -6
View File
@@ -17,7 +17,6 @@ export const { handlers, auth, signIn, signOut } = NextAuth({
if (parsedCredentials.success) {
const { email, password } = parsedCredentials.data;
try {
const userStmt = db.prepare('SELECT * FROM users WHERE email = ?');
const user = userStmt.get(email) as any;
@@ -32,13 +31,9 @@ export const { handlers, auth, signIn, signOut } = NextAuth({
// 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
}
}
console.log('Invalid credentials');
return null;
},
}),