diff --git a/apps/st/src/entities/auth/api/auth-service.ts b/apps/st/src/entities/auth/api/auth-service.ts index 198e69c81..c79034a70 100644 --- a/apps/st/src/entities/auth/api/auth-service.ts +++ b/apps/st/src/entities/auth/api/auth-service.ts @@ -5,17 +5,12 @@ import { ENDPOINT, } from "@/shared/config"; import { getCookie } from "@/shared/lib"; -import { - type AuthPayload, - type AuthService, - getRemainingMs, -} from "@common/auth"; +import { type AuthPayload, type AuthService } from "@common/auth"; import { clearDeviceId, getOrCreateDeviceId } from "../lib/device-id"; import { clearRefreshTimer, setToken, - setupRefreshTimer, tokenManager, } from "../lib/token-manager"; @@ -48,10 +43,10 @@ async function login(payload: AuthPayload): Promise { setToken(CLAIM_NAME, accessToken); setToken(AUTH_USER_ID, tokenId); - const remainingMs = getRemainingMs(accessToken); - if (remainingMs > 0) { - setupRefreshTimer(silentRefresh, remainingMs); - } + // const remainingMs = getRemainingMs(accessToken); + // if (remainingMs > 0) { + // setupRefreshTimer(silentRefresh, remainingMs); + // } } async function silentRefresh(): Promise { @@ -83,10 +78,10 @@ async function silentRefresh(): Promise { setToken(CLAIM_NAME, accessToken); setToken(AUTH_USER_ID, tokenId); - const remainingMs = getRemainingMs(accessToken); - if (remainingMs > 0) { - setupRefreshTimer(silentRefresh, remainingMs); - } + // const remainingMs = getRemainingMs(accessToken); + // if (remainingMs > 0) { + // setupRefreshTimer(silentRefresh, remainingMs); + // } } catch (error) { console.error( `[silentRefresh] Failed at ${new Date().toISOString()}`,