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

@ -22,7 +22,7 @@ class AuthSettings(BaseSettings):
frozen=False,
)
ALGORITHM: str = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES: int = 60
ACCESS_TOKEN_EXPIRE_MINUTES: int = 1
REFRESH_TOKEN_EXPIRE_MINUTES: int = 60 * 12 * 7
# API Key to execute /process endpoint

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);