restore login rate-limit checks

This commit is contained in:
Hazelnoot 2025-03-30 02:15:51 -04:00
parent a2062c6469
commit 1bf6cdc17f

View file

@ -95,6 +95,13 @@ function fetchAccount(token: string, id?: string, forceShowDialog?: boolean): Pr
text: i18n.ts.tokenRevokedDescription, text: i18n.ts.tokenRevokedDescription,
}); });
} }
} else if (res.error.id === 'd5826d14-3982-4d2e-8011-b9e9f02499ef') {
// rate limited
const timeToWait = res.error.info?.resetMs ?? 1000;
window.setTimeout(() => {
fetchAccount(token, id, forceShowDialog).then(done, fail);
}, timeToWait);
return;
} else { } else {
await alert({ await alert({
type: 'error', type: 'error',