1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-23 19:53:55 +00:00

[bug] Add missing await to auth guard

This commit is contained in:
addison
2021-11-03 17:11:22 -04:00
parent fde15347a5
commit 67677b7abe

View File

@@ -16,7 +16,7 @@ export class AuthGuardService implements CanActivate {
private messagingService: MessagingService, private stateService: StateService) { } private messagingService: MessagingService, private stateService: StateService) { }
async canActivate(route: ActivatedRouteSnapshot, routerState: RouterStateSnapshot) { async canActivate(route: ActivatedRouteSnapshot, routerState: RouterStateSnapshot) {
const isAuthed = this.stateService.getIsAuthenticated(); const isAuthed = await this.stateService.getIsAuthenticated();
if (!isAuthed) { if (!isAuthed) {
this.messagingService.send('authBlocked'); this.messagingService.send('authBlocked');
return false; return false;