Skip to content

Commit

Permalink
PM-7186 Added fallback in case of exception that loads password list
Browse files Browse the repository at this point in the history
  • Loading branch information
dinisvieira committed Apr 2, 2024
1 parent 4633fea commit 769ac28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/iOS.Autofill/LoginListViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,10 @@ public async Task DoFido2GetAssertionAsync(IFido2GetAssertionUserInterface fido2
{
if (Context?.IsExecutingWithoutUserInteraction == false)
{
await _platformUtilsService.Value.ShowDialogAsync(
string.Format(AppResources.ThereWasAProblemReadingAPasskeyForXTryAgainLater, Context.PasskeyCredentialRequestParameters.RelyingPartyIdentifier),
AppResources.ErrorReadingPasskey);
TableView.SectionHeaderHeight = 0;
Context.IsPasswordFallback = true;
await ReloadItemsAsync();
_alreadyLoadItemsOnce = true;
}
}
catch (Exception ex)
Expand Down
4 changes: 3 additions & 1 deletion src/iOS.Autofill/Models/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ public ASPasskeyCredentialIdentity PasskeyCredentialIdentity

public bool IsPasskey => PasskeyCredentialRequest != null;

public bool IsPreparingListForPasskey => PasskeyCredentialRequestParameters != null;
public bool IsPasswordFallback { get; set; }

public bool IsPreparingListForPasskey => PasskeyCredentialRequestParameters != null && !IsPasswordFallback;

public bool IsCreatingOrPreparingListForPasskey => IsCreatingPasskey || IsPreparingListForPasskey;
}
Expand Down

0 comments on commit 769ac28

Please sign in to comment.