From 9026dd10e5f6659203266e14a721018363801454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bispo?= Date: Thu, 7 Sep 2023 16:30:46 +0100 Subject: [PATCH] [PM-3593] Fix enable biometric on autofill when there is not MP (#2717) --- .../Controllers/BaseLockPasswordViewController.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs b/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs index 4712f418fd..7b6ff05bc5 100644 --- a/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs +++ b/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs @@ -118,11 +118,15 @@ namespace Bit.iOS.Core.Controllers _pinStatus == PinLockType.Persistent; _biometricEnabled = await _vaultTimeoutService.IsBiometricLockSetAsync() - && await _cryptoService.HasEncryptedUserKeyAsync(); - _biometricIntegrityValid = - await _platformUtilsService.IsBiometricIntegrityValidAsync(BiometricIntegritySourceKey); + && await _biometricService.CanUseBiometricsUnlockAsync(); _hasMasterPassword = await _userVerificationService.HasMasterPasswordAsync(); _biometricUnlockOnly = !_hasMasterPassword && _biometricEnabled && !_pinEnabled; + + if (_biometricUnlockOnly) + { + await EnableBiometricsIfNeeded(); + } + _biometricIntegrityValid = await _platformUtilsService.IsBiometricIntegrityValidAsync(BiometricIntegritySourceKey); } if (_pinEnabled)