fix problem of retries on login page

This commit is contained in:
cristhianzl 2024-03-12 16:26:09 -03:00
commit ff21ecc213
2 changed files with 2 additions and 1 deletions

View file

@ -107,6 +107,7 @@ function ApiInterceptor() {
async function tryToRenewAccessToken(error: AxiosError) {
try {
if (window.location.pathname.includes("/login")) return;
const res = await renewAccessToken();
if (res?.data?.access_token && res?.data?.refresh_token) {
login(res?.data?.access_token);