Skip to content

Commit 0bd30f4

Browse files
committed
fix: 토큰 만료로 reissue 실패시 로그아웃 안되는 문제 해결
1 parent e21092d commit 0bd30f4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/apis/client.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ client.interceptors.response.use(
6363

6464
const originalRequest = error.config;
6565

66-
if (!originalRequest || originalRequest.url === '/auth/reissue') {
67-
if (isLoggedIn) logout();
66+
if (!originalRequest) return Promise.reject(error);
67+
68+
if (originalRequest.url === '/auth/reissue') {
69+
logout();
6870
return Promise.reject(error);
6971
}
7072

@@ -105,6 +107,7 @@ client.interceptors.response.use(
105107
}
106108
}
107109
}
110+
logout();
108111
return Promise.reject(error);
109112
},
110113
);

0 commit comments

Comments
 (0)