mirror of
https://github.com/Fayorg/calendrier-avant.git
synced 2026-05-27 17:18:38 +02:00
fix: removed console.log in different authentication methods
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user