[PR #3019] [MERGED] [PM-5154] Implement iOS Passkey -> Add login item #67918

Closed
opened 2026-05-14 10:07:24 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/3019
Author: @fedemkr
Created: 2/21/2024
Status: Merged
Merged: 2/26/2024
Merged by: @fedemkr

Base: feature/maui-migration-passkeysHead: vault/pm-5154/implement-passkey-login-add


📝 Commits (2)

  • db4219a PM-5154 Implement iOS passkey add login
  • 97c7ace PM-5154 Added Username to Create new login for passkey, for this the param was changed to the Fido2ConfirmNewCredentialParams object so we have access to the proper values. Also added back RpId to the params to have access to it when creating the vault item. Finally added loading to saving the passkey as new login

📊 Changes

9 files changed (+181 additions, -65 deletions)

View changed files

📝 src/Core/Abstractions/ICipherService.cs (+1 -1)
📝 src/Core/Abstractions/IFido2MakeCredentialUserInterface.cs (+5 -0)
📝 src/Core/Services/CipherService.cs (+4 -3)
📝 src/Core/Services/Fido2AuthenticatorService.cs (+2 -1)
📝 src/iOS.Autofill/Fido2MakeCredentialUserInterface.cs (+1 -0)
📝 src/iOS.Autofill/LoginAddViewController.cs (+64 -1)
📝 src/iOS.Autofill/LoginListViewController.cs (+30 -4)
📝 src/iOS.Autofill/Models/Context.cs (+2 -0)
📝 src/iOS.Core/Controllers/LoginAddViewController.cs (+72 -55)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Add Passkey creation logic to "Add login item" flow on iOS Autofill.
This includes autofilling fields on "Add login item" view and saving the new Passkey login item appropriately.

Note: iOS AuthenticationServices doesn't give us the "Relying party name" so we're defaulting to the "Relying party identifier" for autofilling the Login item Name.

Code changes

  • Fido2MakeCredentailUserInterface: Added params to the context so we can autofill the values on the "Add login item" view.
  • LoginAddViewController: Added logic to autofill values with the ones in the context params and also to encrypt and save the new passkey login item.
  • LoginAddViewController (base): Added new logic for when a passkey is being created and refactor a bit the methods so they can be overridden with passkey specific logic on the iOS Autofill add view controller.
  • CipherService: Changed to use the new Fido2 params to create a new login from passkey with proper values.
  • Fido2ConfirmNewCredentialParams: Added back the RpId to be able to use it in the CipherService
  • LoginListViewController: Added loading and better error handling to saving passkey as new login.

Screenshots

Add login Passkey creation flow.

Add login Passkey creation flow

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/3019 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 2/21/2024 **Status:** ✅ Merged **Merged:** 2/26/2024 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `feature/maui-migration-passkeys` ← **Head:** `vault/pm-5154/implement-passkey-login-add` --- ### 📝 Commits (2) - [`db4219a`](https://github.com/bitwarden/android/commit/db4219ac6ab88289cabe35341f1b29bd4617b5c4) PM-5154 Implement iOS passkey add login - [`97c7ace`](https://github.com/bitwarden/android/commit/97c7ace43c44dc032ceb54448e95dbd7e058b972) PM-5154 Added Username to Create new login for passkey, for this the param was changed to the Fido2ConfirmNewCredentialParams object so we have access to the proper values. Also added back RpId to the params to have access to it when creating the vault item. Finally added loading to saving the passkey as new login ### 📊 Changes **9 files changed** (+181 additions, -65 deletions) <details> <summary>View changed files</summary> 📝 `src/Core/Abstractions/ICipherService.cs` (+1 -1) 📝 `src/Core/Abstractions/IFido2MakeCredentialUserInterface.cs` (+5 -0) 📝 `src/Core/Services/CipherService.cs` (+4 -3) 📝 `src/Core/Services/Fido2AuthenticatorService.cs` (+2 -1) 📝 `src/iOS.Autofill/Fido2MakeCredentialUserInterface.cs` (+1 -0) 📝 `src/iOS.Autofill/LoginAddViewController.cs` (+64 -1) 📝 `src/iOS.Autofill/LoginListViewController.cs` (+30 -4) 📝 `src/iOS.Autofill/Models/Context.cs` (+2 -0) 📝 `src/iOS.Core/Controllers/LoginAddViewController.cs` (+72 -55) </details> ### 📄 Description ## Type of change - [ ] Bug fix - [X] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Add Passkey creation logic to "Add login item" flow on iOS Autofill. This includes autofilling fields on "Add login item" view and saving the new Passkey login item appropriately. _Note: iOS AuthenticationServices doesn't give us the "Relying party name" so we're defaulting to the "Relying party identifier" for autofilling the Login item Name._ ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **Fido2MakeCredentailUserInterface:** Added params to the context so we can autofill the values on the "Add login item" view. * **LoginAddViewController:** Added logic to autofill values with the ones in the context params and also to encrypt and save the new passkey login item. * **LoginAddViewController (base):** Added new logic for when a passkey is being created and refactor a bit the methods so they can be overridden with passkey specific logic on the iOS Autofill add view controller. * **CipherService:** Changed to use the new Fido2 params to create a new login from passkey with proper values. * **Fido2ConfirmNewCredentialParams:** Added back the `RpId` to be able to use it in the `CipherService` * **LoginListViewController:** Added loading and better error handling to saving passkey as new login. ## Screenshots <!--Required for any UI changes. Delete if not applicable--> ### Add login Passkey creation flow. <img width="314" alt="Add login Passkey creation flow" src="https://github.com/bitwarden/mobile/assets/15682323/28dfb635-467b-4734-aac3-c603c053bf6c"> ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-14 10:07:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#67918