From eb895e8a27a3997566b2577fc3ebe249197096cd Mon Sep 17 00:00:00 2001 From: Christel Westerberg Date: Tue, 25 Jun 2024 15:19:05 +0200 Subject: [PATCH] chore: add logs to debug auth --- auth.ts | 62 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/auth.ts b/auth.ts index b634a3c4b..8bb7e64f5 100644 --- a/auth.ts +++ b/auth.ts @@ -146,37 +146,37 @@ export const config = { } }, }, - // events: { - // async signIn() { - // console.log("#### SIGNIN EVENT ARGS ######") - // console.log(arguments) - // console.log("#### END - SIGNIN EVENT ARGS ######") - // }, - // async signOut() { - // console.log("#### SIGNOUT EVENT ARGS ######") - // console.log(arguments) - // console.log("#### END - SIGNOUT EVENT ARGS ######") - // }, - // async session() { - // console.log("#### SESSION EVENT ARGS ######") - // console.log(arguments) - // console.log("#### END - SESSION EVENT ARGS ######") - // }, - // }, - // logger: { - // error(code, ...message) { - // console.info("ERROR LOGGER") - // console.error(code, message) - // }, - // warn(code, ...message) { - // console.info("WARN LOGGER") - // console.warn(code, message) - // }, - // debug(code, ...message) { - // console.info("DEBUG LOGGER") - // console.debug(code, message) - // }, - // }, + events: { + async signIn() { + console.log("#### SIGNIN EVENT ARGS ######") + console.log(arguments) + console.log("#### END - SIGNIN EVENT ARGS ######") + }, + async signOut() { + console.log("#### SIGNOUT EVENT ARGS ######") + console.log(arguments) + console.log("#### END - SIGNOUT EVENT ARGS ######") + }, + async session() { + console.log("#### SESSION EVENT ARGS ######") + console.log(arguments) + console.log("#### END - SESSION EVENT ARGS ######") + }, + }, + logger: { + error(code, ...message) { + console.info("ERROR LOGGER") + console.error(code, message) + }, + warn(code, ...message) { + console.info("WARN LOGGER") + console.warn(code, message) + }, + debug(code, ...message) { + console.info("DEBUG LOGGER") + console.debug(code, message) + }, + }, } satisfies NextAuthConfig export const {