mirror of
https://github.com/bitwarden/browser
synced 2025-12-26 05:03:33 +00:00
implement hasKey helper
This commit is contained in:
@@ -15,8 +15,8 @@ export class UnauthGuardService implements CanActivate {
|
||||
async canActivate() {
|
||||
const isAuthed = await this.userService.isAuthenticated();
|
||||
if (isAuthed) {
|
||||
const key = await this.cryptoService.getKey();
|
||||
if (key == null) {
|
||||
const hasKey = await this.cryptoService.hasKey();
|
||||
if (!hasKey) {
|
||||
this.router.navigate(['lock']);
|
||||
} else {
|
||||
this.router.navigate(['vault']);
|
||||
|
||||
Reference in New Issue
Block a user