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": [