Skip to content

Commit

Permalink
PM-7191 fallback to password when having RPId on iOS but no passkey f…
Browse files Browse the repository at this point in the history
…or it
  • Loading branch information
dinisvieira committed Mar 31, 2024
1 parent 4633fea commit 562ea1d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/iOS.Autofill/LoginListViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ public async override void ViewDidLoad()
TableView.Source = tableSource;
tableSource.RegisterTableViewCells(TableView);

//In some scenarios iOS can send an RPId for which we have no passkeys. In that case we want to be able to fallback to Passwords
if (Context.IsPreparingListForPasskey && UIDevice.CurrentDevice.CheckSystemVersion(17, 0))
{
var credentials = await _fido2MediatorService.Value.SilentCredentialDiscoveryAsync(Context.PasskeyCredentialRequestParameters.RelyingPartyIdentifier);
if (credentials == null || credentials.Count() == 0)
{
Context.PasskeyCredentialRequestParameters = null;
TableView.SectionHeaderHeight = 0;
}
}

if (Context.IsCreatingOrPreparingListForPasskey)
{
TableView.SectionHeaderHeight = 55;
Expand Down

0 comments on commit 562ea1d

Please sign in to comment.