From 50ee1db7a0fe207d28e5cbab7b913fd650e7be98 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 5 Jun 2023 17:55:06 +0100 Subject: [PATCH] Allow any user to log into demo --- src/app/api/auth/[...nextauth]/route.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/app/api/auth/[...nextauth]/route.ts b/src/app/api/auth/[...nextauth]/route.ts index 1ae816e..6d27dc0 100644 --- a/src/app/api/auth/[...nextauth]/route.ts +++ b/src/app/api/auth/[...nextauth]/route.ts @@ -27,12 +27,14 @@ export const AuthOptions: NextAuthOptions = { }, callbacks: { async signIn({ user, account, profile, email, credentials }) { - // TODO: While we don't have a database with verified users, we will only allow hestia emails to sign in - if (user.email?.endsWith("@hestia.homes")) { - return true; - } + // TODO: While we don't have a database with verified users, + // for the demo, allow any user to sign in + // if (user.email?.endsWith("@hestia.homes")) { + // return true; + // } // TODO: Handle this more elegantly - return "/beta"; + // return "/beta"; + return true; }, async redirect({ baseUrl }) { const redirectUrl = baseUrl + "/home";