From 25ab2475882f9071643f2bbd3ded18bbea0267bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A7=80=EC=B2=A0?= Date: Thu, 6 Nov 2025 10:13:50 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BF=A0=ED=82=A4=20=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/components/src/ui/header/index.tsx | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/common/components/src/ui/header/index.tsx b/packages/common/components/src/ui/header/index.tsx index 00f758d60..e2cd9a654 100644 --- a/packages/common/components/src/ui/header/index.tsx +++ b/packages/common/components/src/ui/header/index.tsx @@ -5,7 +5,7 @@ import { useQuery } from "@tanstack/react-query"; import { images } from "@common/assets"; import { getConfig } from "@common/config"; import { ENDPOINT } from "../../config"; -import { setCookie, getCookie } from "../../lib"; +import { setCookie, getCookie, removeCookie } from "../../lib"; import { getPopupInfo, getUserPopupList, @@ -70,6 +70,24 @@ export function Header({ viewOnly }: { viewOnly?: boolean }) { method: "POST", }); if (!response.ok) throw new Error("Failed to logout"); + + // 쿠키 삭제 + if (appConfig.AUTH_USER_ID) { + removeCookie(appConfig.AUTH_USER_ID); + } + if (appConfig.REFRESH_TOKEN) { + removeCookie(appConfig.REFRESH_TOKEN); + } + if (appConfig.ACCESS_TOKEN) { + removeCookie(appConfig.ACCESS_TOKEN); + } + if (appConfig.CLAIM_NAME) { + removeCookie(appConfig.CLAIM_NAME); + } + + removeCookie("site-id-key"); + removeCookie("site-theme-key"); + window.location.href = "/auth/login"; } catch (error) { console.error(error);