mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 00:33:49 +03:00
delete user auth if it is not logged in
This commit is contained in:
parent
944f3891bf
commit
2c9129c7b6
@ -100,7 +100,10 @@ export class HydraApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static async revalidateAccessTokenIfExpired() {
|
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();
|
const now = new Date();
|
||||||
if (this.userAuth.expirationTimestamp < now.getTime()) {
|
if (this.userAuth.expirationTimestamp < now.getTime()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user