[as] chore: auth 서비스 수정

This commit is contained in:
2026-07-08 15:55:54 +09:00
parent e05c2a03e0
commit b6714dd8a4
4 changed files with 19 additions and 7 deletions
+16 -4
View File
@@ -1,8 +1,19 @@
import { ACCESS_TOKEN, AUTH_LOGIN_REDIRECT_URL, AUTH_USER_ID, CLAIM_NAME, ENDPOINT } from "@/shared/config";
import { getRemainingMs } from "@common/auth";
import {
ACCESS_TOKEN,
AUTH_LOGIN_REDIRECT_URL,
AUTH_USER_ID,
CLAIM_NAME,
ENDPOINT,
} from "@/shared/config";
import { type AuthPayload, type AuthService, getRemainingMs } from "@common/auth";
import { clearAuthToken, removeToken, setToken, setupRefreshTimer } from "../lib/token-manager";
import type { AuthPayload, AuthService } from "../model/auth-interface";
import {
clearAuthToken,
clearRefreshTimer,
removeToken,
setToken,
setupRefreshTimer,
} from "../lib/token-manager";
async function login(payload: AuthPayload): Promise<void> {
const response = await fetch(`/api/proxy${ENDPOINT.USER_SERVICE.LOGIN}`, {
@@ -88,5 +99,6 @@ async function logout(): Promise<void> {
export const authService: AuthService = {
login,
silentRefresh,
declineSessionExtend: clearRefreshTimer,
logout,
};