NEXT_PUBLIC_CM_LOGIN_PAGE_URL 삭제 및 common-codes 수정

This commit is contained in:
2026-12-04 09:18:45 +09:00
parent 46681a5bb5
commit ec169f913f
26 changed files with 314 additions and 183 deletions
+2 -5
View File
@@ -1,11 +1,8 @@
import { CLAIM_NAME, SITE_ID } from "@/src/shared/config/env";
import { AUTH_LOGIN_REDIRECT_URL, CLAIM_NAME, SITE_ID } from "@/src/shared/config/env";
import { tokenManager } from "@/src/entities/auth/lib/token-manager";
import { getRemainingMs } from "@common/auth";
import { DEV_URL_FO, DEV_URL_WR, LOCAL_URL } from "./config/env";
const LOGIN_PAGE_URL =
process.env.NEXT_PUBLIC_CM_LOGIN_PAGE_URL || "/auth/login";
// client 화면인 경우, 토큰 만료여부 점검하여 로그인 페이지로 이동
const handleUnauthorizedResponse = () => {
if (typeof window === "undefined") return;
@@ -23,7 +20,7 @@ const handleUnauthorizedResponse = () => {
window.location.pathname.startsWith("/auth/login/");
if (!isLoginPage) {
window.location.assign(LOGIN_PAGE_URL);
window.location.assign(AUTH_LOGIN_REDIRECT_URL);
}
};