1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 15:53:44 +00:00

[PM-6798] Fix account switch on autofill (#3106)

* PM-6798 Force state update when opening the Autofill extension

* PM-6798 Fix InitAppIfNeededAsync to be awaited and also ignored Fido2AuthenticatorException from logging them to AppCenter since they don't add much information and we're logging in other places what we need
This commit is contained in:
Federico Maccaroni
2024-03-25 12:17:40 -03:00
committed by GitHub
parent 27380abd89
commit 45641aadfe
4 changed files with 28 additions and 11 deletions

View File

@@ -66,6 +66,10 @@ namespace Bit.iOS.Autofill
}
}
catch (Fido2AuthenticatorException)
{
CancelRequest(ASExtensionErrorCode.Failed);
}
catch (Exception ex)
{
OnProvidingCredentialException(ex);
@@ -79,7 +83,7 @@ namespace Bit.iOS.Autofill
return;
}
InitAppIfNeeded();
await InitAppIfNeededAsync();
if (!await IsAuthed())
{
@@ -174,7 +178,7 @@ namespace Bit.iOS.Autofill
private async Task ProvideCredentialWithoutUserInteractionAsync(ASPasskeyCredentialRequest passkeyCredentialRequest)
{
InitAppIfNeeded();
await InitAppIfNeededAsync();
await _stateService.Value.SetPasswordRepromptAutofillAsync(false);
await _stateService.Value.SetPasswordVerifiedAutofillAsync(false);
if (!await IsAuthed() || await IsLocked())