Merged in chore/debug-auth (pull request #292)

chore: add logs to debug auth

Approved-by: Arvid Norlin
This commit is contained in:
Christel Westerberg
2024-06-25 13:27:57 +00:00
committed by Simon.Emanuelsson

62
auth.ts
View File

@@ -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 {