forked from baron/baron-sso
SSO 로그인 방식을 팝업 기반으로 변경
This commit is contained in:
@@ -30,8 +30,9 @@ apiClient.interceptors.response.use(
|
||||
if (error.response?.status === 401) {
|
||||
// 401 발생 시 로그인 페이지로 리다이렉트
|
||||
const isAuthPath = window.location.pathname.startsWith("/callback");
|
||||
if (!isAuthPath) {
|
||||
userManager.signinRedirect();
|
||||
const isLoginPath = window.location.pathname === "/login";
|
||||
if (!isAuthPath && !isLoginPath) {
|
||||
window.location.href = "/login";
|
||||
}
|
||||
}
|
||||
return Promise.reject(error);
|
||||
|
||||
Reference in New Issue
Block a user