fix: removed console.log in different authentication methods
This commit is contained in:
parent
ff6133d80b
commit
70877ea8dc
|
@ -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',
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue