From 901a044b7d21bffffc0bbba4f5da4ff323345f1f Mon Sep 17 00:00:00 2001 From: "dev.daminik00" Date: Sat, 13 Sep 2025 22:17:12 +0200 Subject: [PATCH] final delete --- src/shared/api/httpClient.ts | 8 +------- src/shared/auth/token.ts | 13 ------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/shared/api/httpClient.ts b/src/shared/api/httpClient.ts index 9aac9b7..1844085 100644 --- a/src/shared/api/httpClient.ts +++ b/src/shared/api/httpClient.ts @@ -91,13 +91,7 @@ class HttpClient { // ignore } } - if (accessToken) { - headers.set("Authorization", `Bearer ${accessToken}`); - - console.log("🔑 Token being sent:", accessToken.substring(0, 20) + "..."); - } else { - console.log("❌ No access token found!"); - } + if (accessToken) headers.set("Authorization", `Bearer ${accessToken}`); headers.set("Content-Type", "application/json"); const res = await fetch(fullUrl, { diff --git a/src/shared/auth/token.ts b/src/shared/auth/token.ts index c393f28..3c99434 100644 --- a/src/shared/auth/token.ts +++ b/src/shared/auth/token.ts @@ -8,25 +8,12 @@ export async function getServerAccessToken() { export function getClientAccessToken(): string | undefined { if (typeof window === "undefined") return undefined; - // eslint-disable-next-line no-console - console.log("🍪 Debug cookies:", document.cookie); - const cookies = document.cookie.split(";"); - // eslint-disable-next-line no-console - console.log("🍪 All cookies:", cookies); - const accessTokenCookie = cookies.find(cookie => cookie.trim().startsWith("accessToken=") ); - // eslint-disable-next-line no-console - console.log("🍪 Found accessToken cookie:", accessTokenCookie); - if (!accessTokenCookie) return undefined; - - // Use substring instead of split to handle tokens with = signs const token = accessTokenCookie.trim().substring("accessToken=".length); - // eslint-disable-next-line no-console - console.log("🍪 Extracted token:", token.substring(0, 20) + "..."); return token; }