logs
This commit is contained in:
@@ -1 +1,2 @@
|
||||
AUTH_SECRET=pY1fHh5vQ7cW6sZ3kE9jL2mN5rX8uB1g
|
||||
|
||||
AUTH_SECRET=7f8a7e6d5c4b3a291f0e9d8c7b6a5f4e3d2c1b0a9e8f7d6c5b4a39281f0e9d8c
|
||||
|
||||
@@ -14,7 +14,6 @@ export const {
|
||||
providers: [
|
||||
CredentialsProvider({
|
||||
name: 'Credentials',
|
||||
// The 'type' property is required for the Credentials provider.
|
||||
type: 'credentials',
|
||||
credentials: {
|
||||
email: { label: 'Email', type: 'email' },
|
||||
@@ -32,16 +31,13 @@ export const {
|
||||
const stmt = db.prepare('SELECT * FROM users WHERE email = ?');
|
||||
const user = stmt.get(email) as User | undefined;
|
||||
|
||||
// In a real app, you would use a secure password hashing library like bcrypt
|
||||
if (user && user.password === password) {
|
||||
// Return a user object that NextAuth will use to create the session
|
||||
return {
|
||||
id: user.id.toString(),
|
||||
name: user.name,
|
||||
email: user.email,
|
||||
};
|
||||
} else {
|
||||
// Invalid credentials
|
||||
return null;
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user