From afca4c760aaed512aad0c742771ee0df94d01a4b Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Wed, 31 Jul 2024 22:25:50 +0200 Subject: [PATCH] [PM-8225] Implement periodic biometric readiness check in lock component (#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 --- apps/desktop/src/auth/lock.component.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/desktop/src/auth/lock.component.ts b/apps/desktop/src/auth/lock.component.ts index ad9f6e5d01..2a71a3d693 100644 --- a/apps/desktop/src/auth/lock.component.ts +++ b/apps/desktop/src/auth/lock.component.ts @@ -40,6 +40,7 @@ export class LockComponent extends BaseLockComponent { protected biometricReady = false; private biometricAsked = false; private autoPromptBiometric = false; + private timerId: any; constructor( masterPasswordService: InternalMasterPasswordServiceAbstraction, @@ -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() {