From 893ce01717bdca8171304ae6ca54eb57b253f83c Mon Sep 17 00:00:00 2001 From: Wesley Finck Date: Tue, 11 Nov 2025 11:11:33 -0500 Subject: [PATCH] format and lint --- src/shared/infrastructure/http/services/CookieService.ts | 4 +++- src/webapp/app/api/auth/logout/route.ts | 8 ++++++-- src/webapp/app/api/auth/me/route.ts | 9 +++++++-- src/webapp/services/auth/CookieAuthService.client.ts | 8 ++++++-- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/shared/infrastructure/http/services/CookieService.ts b/src/shared/infrastructure/http/services/CookieService.ts index 08bb9319..f3a7856d 100644 --- a/src/shared/infrastructure/http/services/CookieService.ts +++ b/src/shared/infrastructure/http/services/CookieService.ts @@ -117,7 +117,9 @@ export class CookieService { */ public clearTokens(res: Response): void { if (ENABLE_AUTH_LOGGING) { - console.log('[CookieService] Clearing both access and refresh token cookies'); + console.log( + '[CookieService] Clearing both access and refresh token cookies', + ); } const cookieOptions = { ...this.getBaseCookieOptions(), diff --git a/src/webapp/app/api/auth/logout/route.ts b/src/webapp/app/api/auth/logout/route.ts index 3810ff38..b5ee3922 100644 --- a/src/webapp/app/api/auth/logout/route.ts +++ b/src/webapp/app/api/auth/logout/route.ts @@ -31,7 +31,9 @@ export async function POST(request: NextRequest) { 'Backend logout failed, clearing cookies in Next.js as fallback', ); if (ENABLE_AUTH_LOGGING) { - console.log('[auth/logout] Clearing cookies as fallback after backend failure'); + console.log( + '[auth/logout] Clearing cookies as fallback after backend failure', + ); } const response = NextResponse.json({ @@ -50,7 +52,9 @@ export async function POST(request: NextRequest) { // Network error - fallback to clearing cookies in Next.js if (ENABLE_AUTH_LOGGING) { - console.log('[auth/logout] Clearing cookies as fallback after network error'); + console.log( + '[auth/logout] Clearing cookies as fallback after network error', + ); } const response = NextResponse.json({ success: true, diff --git a/src/webapp/app/api/auth/me/route.ts b/src/webapp/app/api/auth/me/route.ts index a4b1cb1a..6e9b240a 100644 --- a/src/webapp/app/api/auth/me/route.ts +++ b/src/webapp/app/api/auth/me/route.ts @@ -136,7 +136,9 @@ export async function GET(request: NextRequest) { } // Clear cookies on auth failure if (ENABLE_AUTH_LOGGING) { - console.log('[auth/me] Clearing cookies due to profile fetch failure'); + console.log( + '[auth/me] Clearing cookies due to profile fetch failure', + ); } const response = NextResponse.json( { isAuth: false }, @@ -174,7 +176,10 @@ export async function GET(request: NextRequest) { if (ENABLE_AUTH_LOGGING) { console.log('[auth/me] Clearing cookies due to unexpected auth error'); } - const response = NextResponse.json({ isAuth: false }, { status: 500 }); + const response = NextResponse.json( + { isAuth: false }, + { status: 500 }, + ); response.cookies.delete('accessToken'); response.cookies.delete('refreshToken'); return response; diff --git a/src/webapp/services/auth/CookieAuthService.client.ts b/src/webapp/services/auth/CookieAuthService.client.ts index 1178f40b..f11de061 100644 --- a/src/webapp/services/auth/CookieAuthService.client.ts +++ b/src/webapp/services/auth/CookieAuthService.client.ts @@ -10,7 +10,9 @@ export class ClientCookieAuthService { // Clear cookies via API (logout) static async clearTokens(): Promise { if (ENABLE_AUTH_LOGGING) { - console.log('[ClientCookieAuthService] Initiating token clearing via logout API'); + console.log( + '[ClientCookieAuthService] Initiating token clearing via logout API', + ); } try { const response = await fetch(`${appUrl}/api/auth/logout`, { @@ -24,7 +26,9 @@ export class ClientCookieAuthService { ); } else { if (ENABLE_AUTH_LOGGING) { - console.log('[ClientCookieAuthService] Tokens cleared successfully via logout API'); + console.log( + '[ClientCookieAuthService] Tokens cleared successfully via logout API', + ); } } } catch (error) { -- 2.51.2