[PR #3121] [MERGED] [PM-6798] Fix account switch on iOS Autofill extension #61303

Closed
opened 2026-05-12 00:35:20 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/3121
Author: @fedemkr
Created: 3/27/2024
Status: Merged
Merged: 3/27/2024
Merged by: @vvolkgang

Base: feature/maui-migration-passkeysHead: vault/pm-6798/fix-account-switch-on-ios-autofill


📝 Commits (2)

  • 9fb805d PM-6798 Fix account switch on iOS Autofill extension and also changed to Try... actions for TaskCompletionSource to avoid exceptions on some occasions.
  • d9642b6 Merge branch 'feature/maui-migration-passkeys' into vault/pm-6798/fix-account-switch-on-ios-autofill

📊 Changes

8 files changed (+149 additions, -66 deletions)

View changed files

📝 src/Core/Services/Fido2AuthenticatorService.cs (+72 -43)
📝 src/Core/Services/Logging/ClipLogger.cs (+1 -1)
📝 src/Core/Utilities/Fido2/Fido2AuthenticatorException.cs (+7 -0)
📝 src/iOS.Autofill/CredentialProviderViewController.Passkeys.cs (+23 -15)
📝 src/iOS.Autofill/CredentialProviderViewController.cs (+37 -3)
📝 src/iOS.Autofill/Fido2MakeCredentialUserInterface.cs (+1 -1)
📝 src/iOS.Autofill/Utilities/BaseLoginListTableSource.cs (+7 -2)
📝 src/iOS.Autofill/Utilities/Fido2GetAssertionFromListUserInterface.cs (+1 -1)

📄 Description

Type of change

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

Objective

Fix account switch on iOS Autofill extension

Code changes

  • Fido2AuthenticatorService: Added a do...while for the first part of the flows so if the account is changed an exception is raised and the flow starts over. This was the fastest thing I could come up with to fix this situation.
  • CredentialProviderViewController: Subscribed to account switched completed to reset and set the AccountSwitchedException on the TaskCompletionSources necessary for passkeys. Also improved the code and refactored a bit to be able to reuse some of it in another place.
  • CredentialProviderViewController.Passkeys: Changed how we ensure vault is unlocked to consider more account states and reuse the navigation on the CredentialProviderViewController
  • Ohers: Some fixes to use Try... way for setting state on TaskCompletionSource

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/3121 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 3/27/2024 **Status:** ✅ Merged **Merged:** 3/27/2024 **Merged by:** [@vvolkgang](https://github.com/vvolkgang) **Base:** `feature/maui-migration-passkeys` ← **Head:** `vault/pm-6798/fix-account-switch-on-ios-autofill` --- ### 📝 Commits (2) - [`9fb805d`](https://github.com/bitwarden/android/commit/9fb805d2292f4424e76d3deeb025889182adb20d) PM-6798 Fix account switch on iOS Autofill extension and also changed to Try... actions for TaskCompletionSource to avoid exceptions on some occasions. - [`d9642b6`](https://github.com/bitwarden/android/commit/d9642b657371523cfe131111a2d9a8a94b436736) Merge branch 'feature/maui-migration-passkeys' into vault/pm-6798/fix-account-switch-on-ios-autofill ### 📊 Changes **8 files changed** (+149 additions, -66 deletions) <details> <summary>View changed files</summary> 📝 `src/Core/Services/Fido2AuthenticatorService.cs` (+72 -43) 📝 `src/Core/Services/Logging/ClipLogger.cs` (+1 -1) 📝 `src/Core/Utilities/Fido2/Fido2AuthenticatorException.cs` (+7 -0) 📝 `src/iOS.Autofill/CredentialProviderViewController.Passkeys.cs` (+23 -15) 📝 `src/iOS.Autofill/CredentialProviderViewController.cs` (+37 -3) 📝 `src/iOS.Autofill/Fido2MakeCredentialUserInterface.cs` (+1 -1) 📝 `src/iOS.Autofill/Utilities/BaseLoginListTableSource.cs` (+7 -2) 📝 `src/iOS.Autofill/Utilities/Fido2GetAssertionFromListUserInterface.cs` (+1 -1) </details> ### 📄 Description ## Type of change - [X] Bug fix - [ ] 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--> Fix account switch on iOS Autofill extension ## 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--> * **Fido2AuthenticatorService:** Added a do...while for the first part of the flows so if the account is changed an exception is raised and the flow starts over. This was the fastest thing I could come up with to fix this situation. * **CredentialProviderViewController:** Subscribed to account switched completed to reset and set the `AccountSwitchedException` on the TaskCompletionSources necessary for passkeys. Also improved the code and refactored a bit to be able to reuse some of it in another place. * **CredentialProviderViewController.Passkeys:** Changed how we ensure vault is unlocked to consider more account states and reuse the navigation on the `CredentialProviderViewController` * **Ohers:** Some fixes to use `Try...` way for setting state on `TaskCompletionSource` ## 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-12 00:35:20 -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#61303