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,
|
frozen=False,
|
||||||
)
|
)
|
||||||
ALGORITHM: str = "HS256"
|
ALGORITHM: str = "HS256"
|
||||||
ACCESS_TOKEN_EXPIRE_MINUTES: int = 60
|
ACCESS_TOKEN_EXPIRE_MINUTES: int = 1
|
||||||
REFRESH_TOKEN_EXPIRE_MINUTES: int = 60 * 12 * 7
|
REFRESH_TOKEN_EXPIRE_MINUTES: int = 60 * 12 * 7
|
||||||
|
|
||||||
# API Key to execute /process endpoint
|
# API Key to execute /process endpoint
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,7 @@ function ApiInterceptor() {
|
||||||
|
|
||||||
async function tryToRenewAccessToken(error: AxiosError) {
|
async function tryToRenewAccessToken(error: AxiosError) {
|
||||||
try {
|
try {
|
||||||
|
if (window.location.pathname.includes("/login")) return;
|
||||||
const res = await renewAccessToken();
|
const res = await renewAccessToken();
|
||||||
if (res?.data?.access_token && res?.data?.refresh_token) {
|
if (res?.data?.access_token && res?.data?.refresh_token) {
|
||||||
login(res?.data?.access_token);
|
login(res?.data?.access_token);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue