From 3982c97a9e2f062eba37ab124e7a993f4ca8d73b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Bispo?= Date: Mon, 21 Aug 2023 09:38:23 +0100 Subject: [PATCH 1/2] [PM-3545] Fix biometric unlock for autofill --- .../Controllers/BaseLockPasswordViewController.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs b/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs index 60691b8bb30..2afe7c051f6 100644 --- a/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs +++ b/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs @@ -367,10 +367,21 @@ public async Task PromptBiometricAsync() await _stateService.SetBiometricLockedAsync(!success); if (success) { - DoContinue(); + var userKey = await _cryptoService.GetBiometricUnlockKeyAsync(); + await SetUserKeyAndContinueAsync(userKey); } } + private async Task SetUserKeyAndContinueAsync(UserKey key) + { + var hasKey = await _cryptoService.HasUserKeyAsync(); + if (!hasKey) + { + await _cryptoService.SetUserKeyAsync(key); + } + DoContinue(); + } + public void PromptSSO() { var loginPage = new LoginSsoPage(); From 57423bdd29c6c2a443cf9ba327d460973991b0d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Bispo?= Date: Mon, 21 Aug 2023 20:04:11 +0100 Subject: [PATCH 2/2] [PM-3545] Reuse existing method --- .../Controllers/BaseLockPasswordViewController.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs b/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs index 2afe7c051f6..4712f418fd0 100644 --- a/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs +++ b/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs @@ -368,20 +368,10 @@ public async Task PromptBiometricAsync() if (success) { var userKey = await _cryptoService.GetBiometricUnlockKeyAsync(); - await SetUserKeyAndContinueAsync(userKey); + await SetKeyAndContinueAsync(userKey); } } - private async Task SetUserKeyAndContinueAsync(UserKey key) - { - var hasKey = await _cryptoService.HasUserKeyAsync(); - if (!hasKey) - { - await _cryptoService.SetUserKeyAsync(key); - } - DoContinue(); - } - public void PromptSSO() { var loginPage = new LoginSsoPage();