diff --git a/com.twin.app.shoptime/src/api/TAxios.js b/com.twin.app.shoptime/src/api/TAxios.js index c8fe3633..e344e9ba 100644 --- a/com.twin.app.shoptime/src/api/TAxios.js +++ b/com.twin.app.shoptime/src/api/TAxios.js @@ -18,6 +18,8 @@ import { ACTIVE_POPUP } from "../utils/Config"; import * as HelperMethods from "../utils/helperMethods"; import { getUrl, URLS } from "./apiConfig"; +const retryCount = 0; +const MAX_COUNT = 10; let tokenRefreshing = false; export const setTokenRefreshing = (value) => { console.log("TAxios setTokenRefreshing ", value); @@ -133,14 +135,19 @@ export const TAxios = ( }); return; } + //RefreshToken 만료 if (res?.data?.retCode === 402 || res?.data?.retCode === 501) { - if (!tokenRefreshing) { + if (baseUrl === URLS.GET_RE_AUTHENTICATION_CODE) { dispatch(getAuthenticationCode()); + } else { + if (!tokenRefreshing) { + dispatch(getAuthenticationCode()); + } + checkAccessToken().then((token) => { + executeRequest(token); + }); } - checkAccessToken().then((token) => { - executeRequest(token); - }); return; } // 602 요청 국가 불일치