From d864afb2443cf09d5ad2ec99ac753d206ff42d1b Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 11 Jul 2023 10:43:39 +0100 Subject: [PATCH] Fixed silly sign in bug --- src/app/api/auth/[...nextauth]/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/api/auth/[...nextauth]/route.ts b/src/app/api/auth/[...nextauth]/route.ts index a1335e8..fb3b4cc 100644 --- a/src/app/api/auth/[...nextauth]/route.ts +++ b/src/app/api/auth/[...nextauth]/route.ts @@ -33,7 +33,7 @@ export const AuthOptions: NextAuthOptions = { callbacks: { async signIn({ user, account }) { try { - if (user == null || user.email == null) { + if (user === null || user.email === null) { return "/beta"; } @@ -47,7 +47,7 @@ export const AuthOptions: NextAuthOptions = { return false; } - if (dbUser.length !== 0 || account == null) { + if (dbUser.length === 0 || account === null) { return "/beta"; }