From 061e22d225ad7566e94f4033e818d5be75bd7977 Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Fri, 26 Jul 2024 11:54:13 -0400 Subject: [PATCH] bug fixed --- pages/api/v1/auth/[...nextauth].ts | 5 +---- pages/api/v1/logins/index.ts | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pages/api/v1/auth/[...nextauth].ts b/pages/api/v1/auth/[...nextauth].ts index dd38aa7..17bcaad 100644 --- a/pages/api/v1/auth/[...nextauth].ts +++ b/pages/api/v1/auth/[...nextauth].ts @@ -79,10 +79,7 @@ const STRIPE_SECRET_KEY = process.env.STRIPE_SECRET_KEY; const providers: Provider[] = []; -if ( - process.env.NEXT_PUBLIC_CREDENTIALS_ENABLED === "true" || - process.env.NEXT_PUBLIC_CREDENTIALS_ENABLED === undefined -) { +if (process.env.NEXT_PUBLIC_CREDENTIALS_ENABLED !== "false") { // undefined is for backwards compatibility providers.push( CredentialsProvider({ diff --git a/pages/api/v1/logins/index.ts b/pages/api/v1/logins/index.ts index 7e290af..8a98210 100644 --- a/pages/api/v1/logins/index.ts +++ b/pages/api/v1/logins/index.ts @@ -414,8 +414,7 @@ export function getLogins() { } return { credentialsEnabled: - process.env.NEXT_PUBLIC_CREDENTIALS_ENABLED === "true" || - process.env.NEXT_PUBLIC_CREDENTIALS_ENABLED === undefined + process.env.NEXT_PUBLIC_CREDENTIALS_ENABLED !== "false" ? "true" : "false", emailEnabled: