Skip to content

Commit

Permalink
[Fix/#340] 토큰 재발급 오류 hotfix (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
gudusol authored Oct 9, 2024
1 parent 9d66c7a commit 82b9ab5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/apis/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,13 @@ const fetchAccessToken = async (): Promise<string | null> => {
const axiosError = error as AxiosError<ErrorType>;
const errorData = axiosError.response?.data;

// 리프레시 토큰 만료 시. 로그아웃 처리
if (errorData?.status === 40101) {
// 리프레시 토큰 재발급 오류 시. 로그아웃 처리
if (
errorData?.status === 40101 ||
errorData?.status === 40102 ||
errorData?.status === 40103 ||
errorData?.status === 40104
) {
console.error('리프레시 토큰 만료:', errorData);
clearLocalStorage();
window.location.href = '/login';
Expand Down

0 comments on commit 82b9ab5

Please sign in to comment.