Refresh api token

This commit is contained in:
2023-01-08 18:19:49 +01:00
parent c81a8297b7
commit 44ca2401e0
8 changed files with 30 additions and 16 deletions

View File

@@ -62,8 +62,8 @@ export class LoginPageComponent implements OnInit {
this.ngZone$.run(() => {
this.loading = true;
});
await this.sleep(2500);
await this.auth$.getAPIToken(response.credential);
this.auth$.googleCredential = response.credential;
await this.auth$.getAPIToken();
this.ngZone$.run(() => {
this.router$.navigate(['/app']);
});
@@ -94,8 +94,5 @@ export class LoginPageComponent implements OnInit {
this.loading = false;
}
}
sleep(ms: number) {
return new Promise(resolve => setTimeout(resolve, ms));
}
}