Axios Interceptor Response Token Refresh API called but getting Token is expired regardless in refreshToken API & lator all APIs
问题 my axios interceptor is:- axios.interceptors.response.use((response, error) => { const originalRequest = response.config; if (response.data.status === 'Token is Expired' && originalRequest.url === '/api/refresh') { this.props.history.push('/logout'); Promise.reject(error); } if (response.data.status === 'Token is Expired' && !originalRequest._retry) { originalRequest._retry = true; const playerToken = localStorage.getItem('accessToken'); return axios .get('/api/refresh', { headers: {