Error
Something went wrong.
This commit is contained in:
Binary file not shown.
Binary file not shown.
+2
-1
@@ -1,3 +1,4 @@
|
||||
|
||||
import NextAuth from 'next-auth';
|
||||
import { authConfig } from './auth.config';
|
||||
import Credentials from 'next-auth/providers/credentials';
|
||||
@@ -17,7 +18,7 @@ export const { handlers, auth, signIn, signOut } = NextAuth({
|
||||
const { email, password } = parsedCredentials.data;
|
||||
|
||||
const user = await getUserByEmail(email);
|
||||
if (!user) return null;
|
||||
if (!user || !user.password) return null;
|
||||
|
||||
// WARNING: Storing passwords in plaintext is insecure.
|
||||
// This is for demonstration purposes only.
|
||||
|
||||
Reference in New Issue
Block a user