fix status fetch for refresh token
All checks were successful
Deploy Amap / deploy (push) Successful in 41s
All checks were successful
Deploy Amap / deploy (push) Successful in 41s
This commit is contained in:
@@ -50,7 +50,7 @@ export async function fetchWithAuth(input: RequestInfo, options?: RequestInit, r
|
|||||||
credentials: "include",
|
credentials: "include",
|
||||||
...options,
|
...options,
|
||||||
});
|
});
|
||||||
if (res.status === 401) {
|
if (newRes.status === 401 || newRes.status === 403) {
|
||||||
if (redirect)
|
if (redirect)
|
||||||
window.location.href = `/?sessionExpired=True`;
|
window.location.href = `/?sessionExpired=True`;
|
||||||
const error = new Error("Unauthorized");
|
const error = new Error("Unauthorized");
|
||||||
|
|||||||
Reference in New Issue
Block a user