[cs] chore: auth service 수정

This commit is contained in:
2026-07-07 18:19:43 +09:00
parent 424fa576fb
commit 28d54b615b
3 changed files with 5 additions and 5 deletions
@@ -8,10 +8,10 @@ import {
import { getRemainingMs } from "@common/auth";
import {
clearAuthToken,
removeToken,
setToken,
setupRefreshTimer,
tokenManager,
} from "../lib/token-manager";
import type { AuthPayload, AuthService } from "../model/auth-interface";
@@ -92,7 +92,7 @@ async function silentRefresh(): Promise<void> {
`[silentRefresh] Failed at ${new Date().toISOString()}`,
error,
);
clearAuthToken();
tokenManager.clearAuthToken();
if (typeof window !== "undefined") {
window.dispatchEvent(new CustomEvent("auth:logout"));
}
@@ -110,7 +110,7 @@ async function logout(): Promise<void> {
console.error("Logout API failed:", error);
}
clearAuthToken();
tokenManager.clearAuthToken();
removeToken("site-id-key");
removeToken("site-theme-key");
@@ -1,5 +1,5 @@
import { createTokenManager } from "@common/auth";
import { authConfig } from "@/shared/config/auth";
import { createTokenManager } from "@common/auth";
export const tokenManager = createTokenManager(authConfig);
@@ -8,7 +8,6 @@ export const {
setToken,
removeToken,
setupRefreshTimer,
clearAuthToken,
getAccessToken,
getRefreshToken,
getUserId,
+1
View File
@@ -1,4 +1,5 @@
import type { AuthConfig } from "@common/auth";
import {
ACCESS_TOKEN,
AUTH_USER_ID,