[PR #1849] [MERGED] Misc fixes for account switching #3178

Closed
opened 2025-11-26 23:29:19 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1849
Author: @mpbw2
Created: 3/17/2022
Status: Merged
Merged: 3/17/2022
Merged by: @mpbw2

Base: masterHead: bugfixes-accountswitching


📝 Commits (2)

  • 56e62a2 Misc fixes for account switching
  • 27b114e use unique bio integrity key in ShareExtension

📊 Changes

11 files changed (+30 additions, -14 deletions)

View changed files

📝 src/Android/Services/DeviceActionService.cs (+5 -0)
📝 src/App/Abstractions/IDeviceActionService.cs (+1 -0)
📝 src/App/App.xaml.cs (+2 -1)
📝 src/App/Services/MobileStorageService.cs (+2 -0)
📝 src/App/Utilities/AppHelpers.cs (+2 -0)
📝 src/Core/Constants.cs (+4 -1)
📝 src/iOS.Core/Services/DeviceActionService.cs (+5 -0)
📝 src/iOS.Core/Utilities/ASHelpers.cs (+4 -0)
📝 src/iOS.ShareExtension/LoadingViewController.cs (+2 -2)
📝 src/iOS.ShareExtension/LockPasswordViewController.cs (+1 -1)
📝 src/iOS/AppDelegate.cs (+2 -9)

📄 Description

Type of change

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

Objective

Fixes account switching issues:

  • Update iOS QuickType Bar credentials list when switching accounts without re-syncing
  • Don't auto-prompt biometrics when user initiates lock
  • Add unique cache and bio integrity keys to ShareExtension to make sure it's working from the most recent data

Code changes

  • DeviceActionService.cs: Added OnAccountSwitchCompleteAsync for any platform-specific cleanup required after switching accounts (used to refresh or remove iOS QuickType bar credentials)
  • AppHelpers.cs: Added call to deviceActionService.OnAccountSwitchCompleteAsync() upon account switch completion
  • ASHelpers.cs: Added calls to RemoveAllCredentialIdentitiesAsync() to remove stale credentials from the iOS QuickType bar if the active account isn't authed or unlocked, or contains no matches
  • AppDelegate.cs: Restore calls to RemoveAllCredentialIdentitiesAsync (now that I have a better understanding of the usage) to remove stale credentials from the iOS QuickType bar
  • App.xaml.cs: Added autoPromptBiometric bool as the inverse of userInitiated to fix newly-introduced bio prompt bug
  • Constants/MobileStorageService.cs: Added ShareExtension cache and bio integrity keys
  • LockPasswordViewController.cs: Use unique bio integrity key for ShareExtension
  • LoadingViewController.cs: Fixed typo in stateService resolver and use unique cache key for ShareExtension

Testing requirements

https://app.asana.com/0/1201965132275037/1201978140678545
https://app.asana.com/0/1201803072708593/1201967780107162

Before you submit

  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • 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/1849 **Author:** [@mpbw2](https://github.com/mpbw2) **Created:** 3/17/2022 **Status:** ✅ Merged **Merged:** 3/17/2022 **Merged by:** [@mpbw2](https://github.com/mpbw2) **Base:** `master` ← **Head:** `bugfixes-accountswitching` --- ### 📝 Commits (2) - [`56e62a2`](https://github.com/bitwarden/android/commit/56e62a29465a6a699d1e7f5bb54228a759c010d0) Misc fixes for account switching - [`27b114e`](https://github.com/bitwarden/android/commit/27b114ed85f99acaf2688f003aaa9c234bb40894) use unique bio integrity key in ShareExtension ### 📊 Changes **11 files changed** (+30 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `src/Android/Services/DeviceActionService.cs` (+5 -0) 📝 `src/App/Abstractions/IDeviceActionService.cs` (+1 -0) 📝 `src/App/App.xaml.cs` (+2 -1) 📝 `src/App/Services/MobileStorageService.cs` (+2 -0) 📝 `src/App/Utilities/AppHelpers.cs` (+2 -0) 📝 `src/Core/Constants.cs` (+4 -1) 📝 `src/iOS.Core/Services/DeviceActionService.cs` (+5 -0) 📝 `src/iOS.Core/Utilities/ASHelpers.cs` (+4 -0) 📝 `src/iOS.ShareExtension/LoadingViewController.cs` (+2 -2) 📝 `src/iOS.ShareExtension/LockPasswordViewController.cs` (+1 -1) 📝 `src/iOS/AppDelegate.cs` (+2 -9) </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--> Fixes account switching issues: - Update iOS QuickType Bar credentials list when switching accounts without re-syncing - Don't auto-prompt biometrics when user initiates lock - Add unique cache and bio integrity keys to ShareExtension to make sure it's working from the most recent data ## 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--> * **DeviceActionService.cs:** Added `OnAccountSwitchCompleteAsync` for any platform-specific cleanup required after switching accounts (used to refresh or remove iOS QuickType bar credentials) * **AppHelpers.cs:** Added call to `deviceActionService.OnAccountSwitchCompleteAsync()` upon account switch completion * **ASHelpers.cs:** Added calls to `RemoveAllCredentialIdentitiesAsync()` to remove stale credentials from the iOS QuickType bar if the active account isn't authed or unlocked, or contains no matches * **AppDelegate.cs:** Restore calls to `RemoveAllCredentialIdentitiesAsync` (now that I have a better understanding of the usage) to remove stale credentials from the iOS QuickType bar * **App.xaml.cs:** Added `autoPromptBiometric` bool as the inverse of `userInitiated` to fix newly-introduced bio prompt bug * **Constants/MobileStorageService.cs:** Added ShareExtension cache and bio integrity keys * **LockPasswordViewController.cs:** Use unique bio integrity key for ShareExtension * **LoadingViewController.cs:** Fixed typo in `stateService` resolver and use unique cache key for ShareExtension ## Testing requirements <!--What functionality requires testing by QA? This includes testing new behavior and regression testing--> https://app.asana.com/0/1201965132275037/1201978140678545 https://app.asana.com/0/1201803072708593/1201967780107162 ## Before you submit - [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required) - [ ] This change requires a **documentation update** (notify the documentation team) - [ ] 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 2025-11-26 23:29:19 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3178