From 5f4cd62f66d05176956a01465617e39289fe3f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bispo?= Date: Fri, 11 Aug 2023 15:16:01 +0100 Subject: [PATCH] [PM-3303] Fix biometric login after key migration (#2679) * [PM-3303] Add condition to biometric unlock --- src/App/Pages/Accounts/LockPageViewModel.cs | 1 - src/App/Services/BaseBiometricService.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/App/Pages/Accounts/LockPageViewModel.cs b/src/App/Pages/Accounts/LockPageViewModel.cs index 2bb5d620b..3e6946c6a 100644 --- a/src/App/Pages/Accounts/LockPageViewModel.cs +++ b/src/App/Pages/Accounts/LockPageViewModel.cs @@ -179,7 +179,6 @@ namespace Bit.App.Pages ?? await _stateService.GetPinProtectedKeyAsync(); PinEnabled = (_pinStatus == PinLockType.Transient && ephemeralPinSet != null) || _pinStatus == PinLockType.Persistent; - BiometricEnabled = await _vaultTimeoutService.IsBiometricLockSetAsync() && await _biometricService.CanUseBiometricsUnlockAsync(); // Users without MP and without biometric or pin has no MP to unlock with diff --git a/src/App/Services/BaseBiometricService.cs b/src/App/Services/BaseBiometricService.cs index 3d9ea9cc2..0c3c8e34a 100644 --- a/src/App/Services/BaseBiometricService.cs +++ b/src/App/Services/BaseBiometricService.cs @@ -16,7 +16,7 @@ namespace Bit.App.Services public async Task CanUseBiometricsUnlockAsync() { - return await _cryptoService.HasEncryptedUserKeyAsync() || await _stateService.GetKeyEncryptedAsync() != null; + return await _cryptoService.GetBiometricUnlockKeyAsync() != null || await _stateService.GetKeyEncryptedAsync() != null; } public abstract Task IsSystemBiometricIntegrityValidAsync(string bioIntegritySrcKey = null);