diff --git a/.env b/.env index 24eb238..c61cd0d 100644 --- a/.env +++ b/.env @@ -1 +1,2 @@ -AUTH_SECRET=pY1fHh5vQ7cW6sZ3kE9jL2mN5rX8uB1g \ No newline at end of file + +AUTH_SECRET=7f8a7e6d5c4b3a291f0e9d8c7b6a5f4e3d2c1b0a9e8f7d6c5b4a39281f0e9d8c diff --git a/src/app/api/auth/[...nextauth]/route.ts b/src/app/api/auth/[...nextauth]/route.ts index 462c56a..3909143 100644 --- a/src/app/api/auth/[...nextauth]/route.ts +++ b/src/app/api/auth/[...nextauth]/route.ts @@ -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) {