From f58f6184bc4e9a44dac33599aac73cff5c94bdf1 Mon Sep 17 00:00:00 2001 From: Arnaud Lyard Date: Mon, 12 Aug 2024 14:32:19 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20logs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/middleware.ts | 3 --- server/src/utils/jwt.ts | 3 --- 2 files changed, 6 deletions(-) diff --git a/client/src/middleware.ts b/client/src/middleware.ts index 7eb8eaf..6a38dac 100644 --- a/client/src/middleware.ts +++ b/client/src/middleware.ts @@ -9,9 +9,7 @@ const locales = ['en', 'fr']; async function importKey() { const alg = 'RS256'; const spki = process.env.JWT_PUBLIC_KEY!; - console.log('spki', spki); const publicKey = await jose.importSPKI(spki, alg); - console.log('publicKey', publicKey); return publicKey; } @@ -53,7 +51,6 @@ async function i18nMiddleware(request: NextRequest) { } export async function middleware(request: NextRequest) { - console.log(request.nextUrl.pathname); if ( request.nextUrl.pathname.startsWith('/fr/user') || request.nextUrl.pathname.startsWith('/en/user') || diff --git a/server/src/utils/jwt.ts b/server/src/utils/jwt.ts index 3ee6873..11e1adf 100644 --- a/server/src/utils/jwt.ts +++ b/server/src/utils/jwt.ts @@ -2,7 +2,6 @@ import jwt, { SignOptions } from 'jsonwebtoken'; export const signJwt = (payload: Object, options: SignOptions) => { const privateKey = process.env.JWT_ACCESS_TOKEN_PRIVATE_KEY; - console.log(privateKey); return jwt.sign(payload, privateKey, { ...(options && options), algorithm: 'RS256', @@ -12,9 +11,7 @@ export const signJwt = (payload: Object, options: SignOptions) => { export const verifyJwt = (token: string): T | null => { try { const publicKey = process.env.JWT_ACCESS_TOKEN_PUBLIC_KEY; - console.log('publickey', publicKey); const decoded = jwt.verify(token, publicKey) as T; - console.log('decoded', decoded); return decoded; } catch (error) {