From 914df505ae61791c94951c9039bc2916390863b6 Mon Sep 17 00:00:00 2001 From: bicochan Date: Wed, 8 Jul 2026 15:52:14 +0900 Subject: [PATCH] =?UTF-8?q?[cs]=20chore:=20auth=20=EC=84=9C=EB=B9=84?= =?UTF-8?q?=EC=8A=A4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/cs/package.json | 1 + apps/cs/src/entities/auth/api/auth-service.ts | 9 +++++++-- apps/cs/src/entities/auth/lib/token-manager.ts | 1 + apps/cs/src/entities/auth/model/auth-interface.ts | 1 - apps/cs/tsconfig.json | 6 +----- 5 files changed, 10 insertions(+), 8 deletions(-) delete mode 100644 apps/cs/src/entities/auth/model/auth-interface.ts diff --git a/apps/cs/package.json b/apps/cs/package.json index b7e1421d8..d362d1178 100644 --- a/apps/cs/package.json +++ b/apps/cs/package.json @@ -13,6 +13,7 @@ "@common/auth": "workspace:*", "@common/components": "workspace:*", "@common/config": "workspace:*", + "@common/network": "workspace:*", "@fontsource-variable/noto-sans-kr": "^5.2.5", "@frontend-opensource/use-react-hooks": "^1.1.4", "@fullcalendar/core": "^6.1.17", diff --git a/apps/cs/src/entities/auth/api/auth-service.ts b/apps/cs/src/entities/auth/api/auth-service.ts index ef08d8ee1..a94ae9541 100644 --- a/apps/cs/src/entities/auth/api/auth-service.ts +++ b/apps/cs/src/entities/auth/api/auth-service.ts @@ -5,15 +5,19 @@ import { CLAIM_NAME, ENDPOINT, } from "@/shared/config"; -import { getRemainingMs } from "@common/auth"; +import { + type AuthPayload, + type AuthService, + getRemainingMs, +} from "@common/auth"; import { + clearRefreshTimer, removeToken, setToken, setupRefreshTimer, tokenManager, } from "../lib/token-manager"; -import type { AuthPayload, AuthService } from "../model/auth-interface"; function resolveLoginError(message: string | undefined): string { switch (message) { @@ -123,5 +127,6 @@ async function logout(): Promise { export const authService: AuthService = { login, silentRefresh, + declineSessionExtend: clearRefreshTimer, logout, }; diff --git a/apps/cs/src/entities/auth/lib/token-manager.ts b/apps/cs/src/entities/auth/lib/token-manager.ts index 89f0c7371..78d24bd5e 100644 --- a/apps/cs/src/entities/auth/lib/token-manager.ts +++ b/apps/cs/src/entities/auth/lib/token-manager.ts @@ -8,6 +8,7 @@ export const { setToken, removeToken, setupRefreshTimer, + clearRefreshTimer, getAccessToken, getRefreshToken, getUserId, diff --git a/apps/cs/src/entities/auth/model/auth-interface.ts b/apps/cs/src/entities/auth/model/auth-interface.ts deleted file mode 100644 index 97078052e..000000000 --- a/apps/cs/src/entities/auth/model/auth-interface.ts +++ /dev/null @@ -1 +0,0 @@ -export type { AuthPayload, AuthService } from "@common/auth"; diff --git a/apps/cs/tsconfig.json b/apps/cs/tsconfig.json index 5b8c29899..05cbfce70 100644 --- a/apps/cs/tsconfig.json +++ b/apps/cs/tsconfig.json @@ -22,12 +22,8 @@ "name": "next" } ], - "baseUrl": "./src", "paths": { - "@/*": ["./*"], - "@common/components": ["../../../packages/common/components/src/"], - "@common/config": ["../../../packages/common/config/dist/"], - "@common/network": ["../../../packages/common/network/"] + "@/*": ["./src/*"] } }, "include": [