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>) {
event.preventDefault();
console.log('Trying to sign in');
await signIn('credentials', {
key: password,
callbackUrl: '/play',

View File

@ -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;
}