Skip to content

Commit 8980d3e

Browse files
authored
Merge pull request #326 from SSAF-SOUND/fix/revert-reissue-bug
Revert 무한 재발급 감지시 로그아웃 호출
2 parents ee17981 + 88882c7 commit 8980d3e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/utils/axios.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import type { ApiErrorResponse } from '~/types';
99
import * as Sentry from '@sentry/nextjs';
1010
import axios, { isAxiosError } from 'axios';
1111

12-
import { reissueToken, signOut } from '~/services/auth';
13-
import { clearPrivateData } from '~/utils/clearPrivateData';
12+
import { reissueToken } from '~/services/auth';
1413
import { createRequestInfiniteLoopDetector } from '~/utils/createRequestInfiniteLoopDetector';
1514
import { customToast } from '~/utils/customToast';
1615
import { qsStringify } from '~/utils/qsUtils';
@@ -49,14 +48,12 @@ const detectRequestInfiniteLoop = createRequestInfiniteLoopDetector(
4948
requestCounterConsideredInfiniteLoop,
5049
{
5150
timerSeconds: 10,
52-
onDetect: async () => {
51+
onDetect: () => {
5352
const errorMessage = isDevMode
5453
? '등록하지 않은 Mocking API가 있는지 확인해주세요! HTTP Method가 일치하지 않는 문제일 수도 있습니다.'
5554
: '오류가 발생했습니다.';
5655
customToast.clientError(errorMessage);
5756
Sentry.captureException(new Error('Error: Detect request infinite loop'));
58-
await signOut();
59-
clearPrivateData();
6057
},
6158
}
6259
);

0 commit comments

Comments
 (0)