mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00:00
soft locking with protected pin
This commit is contained in:
@@ -5,8 +5,8 @@ import { NotificationType } from '../enums/notificationType';
|
||||
|
||||
import { ApiService } from '../abstractions/api.service';
|
||||
import { AppIdService } from '../abstractions/appId.service';
|
||||
import { CryptoService } from '../abstractions/crypto.service';
|
||||
import { EnvironmentService } from '../abstractions/environment.service';
|
||||
import { LockService } from '../abstractions/lock.service';
|
||||
import { NotificationsService as NotificationsServiceAbstraction } from '../abstractions/notifications.service';
|
||||
import { SyncService } from '../abstractions/sync.service';
|
||||
import { UserService } from '../abstractions/user.service';
|
||||
@@ -27,7 +27,7 @@ export class NotificationsService implements NotificationsServiceAbstraction {
|
||||
|
||||
constructor(private userService: UserService, private syncService: SyncService,
|
||||
private appIdService: AppIdService, private apiService: ApiService,
|
||||
private cryptoService: CryptoService, private logoutCallback: () => Promise<void>) { }
|
||||
private lockService: LockService, private logoutCallback: () => Promise<void>) { }
|
||||
|
||||
async init(environmentService: EnvironmentService): Promise<void> {
|
||||
this.inited = false;
|
||||
@@ -185,7 +185,7 @@ export class NotificationsService implements NotificationsServiceAbstraction {
|
||||
|
||||
private async isAuthedAndUnlocked() {
|
||||
if (await this.userService.isAuthenticated()) {
|
||||
return this.cryptoService.hasKey();
|
||||
return this.lockService.isLocked();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user