From 70877ea8dc823d480e57681967f0daa47129aace Mon Sep 17 00:00:00 2001 From: Fayorg Date: Mon, 18 Dec 2023 15:03:42 +0100 Subject: [PATCH] fix: removed console.log in different authentication methods --- components/forms/LoginForm.tsx | 1 - lib/authenticate.ts | 6 ------ 2 files changed, 7 deletions(-) diff --git a/components/forms/LoginForm.tsx b/components/forms/LoginForm.tsx index 1c9f826..e0a8f76 100644 --- a/components/forms/LoginForm.tsx +++ b/components/forms/LoginForm.tsx @@ -11,7 +11,6 @@ export function LoginForm() { async function handleSubmit(event: React.FormEvent) { event.preventDefault(); - console.log('Trying to sign in'); await signIn('credentials', { key: password, callbackUrl: '/play', diff --git a/lib/authenticate.ts b/lib/authenticate.ts index 407e937..fbd4372 100644 --- a/lib/authenticate.ts +++ b/lib/authenticate.ts @@ -4,7 +4,6 @@ import { getServerSession, RequestInternal, type NextAuthOptions, User } from "n import type { GetServerSidePropsContext, NextApiRequest, NextApiResponse } from "next" export async function authenticate(key: string) { - console.log("Running authenticate function with key: " + key); const user = await prisma.users.findUnique({ select: { id: true, @@ -17,8 +16,6 @@ export async function authenticate(key: string) { } }); - console.log("Found user: " + JSON.stringify(user)); - if(!user) return null; return user; @@ -61,11 +58,8 @@ export const authOptions: NextAuthOptions = { const { key } = credentials as { key: string }; - console.log("Running authorize function with key: " + key) const user = await authenticate(key) as User | null - - console.log("Found user in authorize: " + JSON.stringify(user)); return user; }