From 495509c888dcb99fd16b40f0aede9fd4f1f97928 Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Mon, 19 Aug 2024 19:25:13 -0400 Subject: [PATCH 1/2] bug fix --- components/InstallApp.tsx | 2 +- pages/api/v1/auth/[...nextauth].ts | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/components/InstallApp.tsx b/components/InstallApp.tsx index f191f006..50071da6 100644 --- a/components/InstallApp.tsx +++ b/components/InstallApp.tsx @@ -8,7 +8,7 @@ const InstallApp = (props: Props) => { const [isOpen, setIsOpen] = useState(true); return isOpen && !isPWA() ? ( -
+
Date: Mon, 19 Aug 2024 19:30:01 -0400 Subject: [PATCH 2/2] minor change --- pages/api/v1/auth/[...nextauth].ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/api/v1/auth/[...nextauth].ts b/pages/api/v1/auth/[...nextauth].ts index 8b97c046..2351fdd7 100644 --- a/pages/api/v1/auth/[...nextauth].ts +++ b/pages/api/v1/auth/[...nextauth].ts @@ -1179,14 +1179,14 @@ export default async function auth(req: NextApiRequest, res: NextApiResponse) { }, callbacks: { async signIn({ user, account, profile, email, credentials }) { - if (account?.provider !== "credentials" && newSsoUsersDisabled) { + if (account?.provider !== "credentials") { // registration via SSO can be separately disabled const existingUser = await prisma.account.findFirst({ where: { providerAccountId: account?.providerAccountId, }, }); - if (!existingUser) { + if (!existingUser && newSsoUsersDisabled) { return false; } }