From 3f8f546731ef94054099e35fd81cbc417a960721 Mon Sep 17 00:00:00 2001 From: walnuts1018 Date: Tue, 7 Nov 2023 23:37:36 +0900 Subject: [PATCH] Remove console.debug statements from authOptions --- front/src/app/api/auth/[...nextauth]/options.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/front/src/app/api/auth/[...nextauth]/options.ts b/front/src/app/api/auth/[...nextauth]/options.ts index 4b6cc0c..9ba319e 100644 --- a/front/src/app/api/auth/[...nextauth]/options.ts +++ b/front/src/app/api/auth/[...nextauth]/options.ts @@ -41,7 +41,6 @@ export const authOptions: NextAuthOptions = { isNewUser?: boolean; session?: any; }) => { - console.debug("JWT Callback", token); if (user) { token.role = user.role; } @@ -54,7 +53,6 @@ export const authOptions: NextAuthOptions = { lock.acquire("refreshToken", async function (done) { try { const cachedJsonData = await redis.get("openchokin-" + token.sub as string); - console.debug("Cached data", cachedJsonData); if (cachedJsonData) { const cachedData = JSON.parse(cachedJsonData); const iv = Buffer.from(cachedData.iv, 'hex'); @@ -86,7 +84,6 @@ export const authOptions: NextAuthOptions = { expiresAt: token.expiresAt, iv: iv.toString('hex'), }) - console.debug("New cached data", newCachedData); await redis.set("openchokin-" + token.sub as string, newCachedData, "EX", 60 * 60 * 24 * 30); } catch (e) { console.error("Error refreshing token", e); @@ -103,7 +100,6 @@ export const authOptions: NextAuthOptions = { session.user.role = token.role; session.user.idToken = token.idToken; session.user.sub = token.sub; - //console.debug(session); return session; }, },