Skip to content

Commit

Permalink
[PM-8225] Implement periodic biometric readiness check in lock compon…
Browse files Browse the repository at this point in the history
…ent (#9976)

* Remove old biometrics masterkey logic

* Move shared ipc keys to main process

* Allow browser extension unlock while desktop is locked

* Dynamicall detect biometrics on desktop lock screen
  • Loading branch information
quexten authored Jul 31, 2024
1 parent 3de85c7 commit afca4c7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/desktop/src/auth/lock.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export class LockComponent extends BaseLockComponent {
protected biometricReady = false;
private biometricAsked = false;
private autoPromptBiometric = false;
private timerId: any;

constructor(
masterPasswordService: InternalMasterPasswordServiceAbstraction,
Expand Down Expand Up @@ -135,11 +136,18 @@ export class LockComponent extends BaseLockComponent {
});
});
this.messagingService.send("getWindowIsFocused");

// start background listener until destroyed on interval
this.timerId = setInterval(async () => {
this.supportsBiometric = await this.platformUtilsService.supportsBiometric();
this.biometricReady = await this.canUseBiometric();
}, 1000);
}

ngOnDestroy() {
super.ngOnDestroy();
this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);
clearInterval(this.timerId);
}

onWindowHidden() {
Expand Down

0 comments on commit afca4c7

Please sign in to comment.