mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: handle refreshToken failure
This commit is contained in:
parent
3d0bf11359
commit
b06339d362
1 changed files with 3 additions and 1 deletions
|
@ -12,7 +12,9 @@ const openAuthWindow = async (
|
||||||
});
|
});
|
||||||
|
|
||||||
if ([AuthPage.UpdateEmail, AuthPage.UpdatePassword].includes(page)) {
|
if ([AuthPage.UpdateEmail, AuthPage.UpdatePassword].includes(page)) {
|
||||||
const { accessToken } = await HydraApi.refreshToken();
|
const { accessToken } = await HydraApi.refreshToken().catch(() => {
|
||||||
|
return { accessToken: "" };
|
||||||
|
});
|
||||||
searchParams.set("token", accessToken);
|
searchParams.set("token", accessToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue