Skip to content

Commit

Permalink
Remove console.debug statements from authOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
walnuts1018 committed Nov 7, 2023
1 parent d4cf5ad commit 3f8f546
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions front/src/app/api/auth/[...nextauth]/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export const authOptions: NextAuthOptions = {
isNewUser?: boolean;
session?: any;
}) => {
console.debug("JWT Callback", token);
if (user) {
token.role = user.role;
}
Expand All @@ -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');
Expand Down Expand Up @@ -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);
Expand All @@ -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;
},
},
Expand Down

0 comments on commit 3f8f546

Please sign in to comment.