fix problem of retries on login page
This commit is contained in:
parent
fa04f70b32
commit
ff21ecc213
2 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue