fix: removed console.log in different authentication methods

This commit is contained in:
Elie Baier 2023-12-18 15:03:42 +01:00
parent ff6133d80b
commit 70877ea8dc
2 changed files with 0 additions and 7 deletions

View File

@ -11,7 +11,6 @@ export function LoginForm() {
async function handleSubmit(event: React.FormEvent<HTMLFormElement>) { async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault(); event.preventDefault();
console.log('Trying to sign in');
await signIn('credentials', { await signIn('credentials', {
key: password, key: password,
callbackUrl: '/play', callbackUrl: '/play',

View File

@ -4,7 +4,6 @@ import { getServerSession, RequestInternal, type NextAuthOptions, User } from "n
import type { GetServerSidePropsContext, NextApiRequest, NextApiResponse } from "next" import type { GetServerSidePropsContext, NextApiRequest, NextApiResponse } from "next"
export async function authenticate(key: string) { export async function authenticate(key: string) {
console.log("Running authenticate function with key: " + key);
const user = await prisma.users.findUnique({ const user = await prisma.users.findUnique({
select: { select: {
id: true, id: true,
@ -17,8 +16,6 @@ export async function authenticate(key: string) {
} }
}); });
console.log("Found user: " + JSON.stringify(user));
if(!user) return null; if(!user) return null;
return user; return user;
@ -61,12 +58,9 @@ export const authOptions: NextAuthOptions = {
const { key } = credentials as { const { key } = credentials as {
key: string key: string
}; };
console.log("Running authorize function with key: " + key)
const user = await authenticate(key) as User | null const user = await authenticate(key) as User | null
console.log("Found user in authorize: " + JSON.stringify(user));
return user; return user;
} }
}) })