NEXT_PUBLIC_CM_LOGIN_PAGE_URL 삭제 및 common-codes 수정
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { DEV_URL_FO, DEV_URL_WR, LOCAL_URL } from "../config/";
|
||||
import { CLAIM_NAME, SITE_ID } from "@/src/shared/config";
|
||||
import { AUTH_LOGIN_REDIRECT_URL, CLAIM_NAME, SITE_ID } from "@/src/shared/config";
|
||||
import { tokenManager } from "@/src/entities/auth/lib/token-manager";
|
||||
import { getRemainingMs } from "@common/auth";
|
||||
|
||||
@@ -10,9 +10,6 @@ export const fetchType = {
|
||||
CS: "CS",
|
||||
};
|
||||
|
||||
const LOGIN_PAGE_URL =
|
||||
process.env.NEXT_PUBLIC_CM_LOGIN_PAGE_URL || "/auth/login";
|
||||
|
||||
const getDefaultHeaders = (headers: HeadersInit = {}) => ({
|
||||
...headers,
|
||||
"X-Site-Id": SITE_ID,
|
||||
@@ -34,7 +31,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