NEXT_PUBLIC_CM_LOGIN_PAGE_URL 삭제 및 common-codes 수정
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user