From b8beee4f1d881c1d8802dc147359600f0470fac4 Mon Sep 17 00:00:00 2001 From: timthedev07 Date: Fri, 29 Dec 2023 03:09:41 +0100 Subject: [PATCH] fix! --- app/src/lib/authoptions.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/lib/authoptions.ts b/app/src/lib/authoptions.ts index 58c304d..199b07d 100644 --- a/app/src/lib/authoptions.ts +++ b/app/src/lib/authoptions.ts @@ -28,12 +28,13 @@ export const authOptions: AuthOptions = { async signIn({ user /**account, profile, email, credentials */ }) { if ( process.env.NODE_ENV === "production" && - (!( - user.email?.endsWith("@kcpupils.org") && - user.email?.endsWith("@kings.education") && - user.email?.endsWith("@kingsgroup.org") - ) || - !user.email) + (!user.email || + !( + user.email.endsWith("@kcpupils.org") || + user.email.endsWith("@kings.education") || + user.email.endsWith("@kingsgroup.org") || + user.email === "kcamathshub.testing@gmail.com" + )) ) { return false; }