mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-13 03:32:13 +00:00
delete user auth if it is not logged in
This commit is contained in:
parent
944f3891bf
commit
2c9129c7b6
1 changed files with 4 additions and 1 deletions
|
@ -100,7 +100,10 @@ export class HydraApi {
|
|||
}
|
||||
|
||||
private static async revalidateAccessTokenIfExpired() {
|
||||
if (!this.userAuth.authToken) throw new Error("user is not logged in");
|
||||
if (!this.userAuth.authToken) {
|
||||
userAuthRepository.delete({ id: 1 });
|
||||
throw new Error("user is not logged in");
|
||||
}
|
||||
|
||||
const now = new Date();
|
||||
if (this.userAuth.expirationTimestamp < now.getTime()) {
|
||||
|
|
Loading…
Reference in a new issue