[PR #3234] [CLOSED] [PM-7963] Fix vault timeout immediately on Android Fido2 autofill #16862

Closed
opened 2026-04-15 02:31:18 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/3234
Author: @fedemkr
Created: 5/10/2024
Status: Closed

Base: mainHead: mobiletf/pm-7963/fido2-autofill-timeout-immediately


📝 Commits (10+)

📊 Changes

4 files changed (+94 additions, -12 deletions)

View changed files

📝 src/App/Platforms/Android/Autofill/CredentialProviderSelectionActivity.cs (+44 -10)
📝 src/App/Platforms/Android/Autofill/Fido2GetAssertionUserInterface.cs (+37 -2)
📝 src/App/Platforms/Android/Services/DeviceActionService.cs (+12 -0)
📝 src/Core/Utilities/Fido2/CredentialProviderConstants.cs (+1 -0)

📄 Description

Type of change

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

Objective

Fix vault timeout immediately on Android Fido2 autofill, where it was locking immediately after user unlocks because changing activity

Code changes

  • CredentialProviderSelectionActivity: Changed NoHistory to false so we can launch the MainActivity and return to this one. Added the activity launcher so we can launch MainActivity to unlock the vault after the user selects the cipher to autofill which confirms unlock on the callback.
  • Fido2GetAssertionUserInterface: Added _unlockVaultTcs so we can await until the user unlocks on immediate timeout vaults to ensure vault is unlocked for the Fido2 flow.
  • DeviceActionService: Added a new CredentialProviderConstants.Fido2CredentialNeedsUnlockingAgainBecauseImmediateTimeout to have a way to know after unlocking that is because of this scenario and then set the result back. Here a caveat is that we set vaultTimeoutService.DelayLockAndLogoutMs in order to maintain a time window of the vault unlocked for this flow. Otherwise it'll be immediately locked after the MainActivity is finished.

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/3234 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 5/10/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `mobiletf/pm-7963/fido2-autofill-timeout-immediately` --- ### 📝 Commits (10+) - [`eea7c6b`](https://github.com/bitwarden/android/commit/eea7c6b7d72f96b6d3acbd71c6357dcf3a472344) [PM-2901] Synchronize sends on send creation/update/deletion notification (#2606) - [`6d4793d`](https://github.com/bitwarden/android/commit/6d4793d5928e90137aa0d717007d5868d740be44) [PM-1768] Set up CODEOWNERS file (#2464) - [`420dc09`](https://github.com/bitwarden/android/commit/420dc09fd147275b89a67e697c10f1e14b8be056) Update codeowners (#2691) - [`f426c0e`](https://github.com/bitwarden/android/commit/f426c0e37042aeae73fdc8b1c6bb494818b21e01) Create section for crowdin sync (#2692) - [`8474f53`](https://github.com/bitwarden/android/commit/8474f536ffe47491b93898664f48d8c86c3b5f52) Autosync the updated translations (#2677) - [`01ac20e`](https://github.com/bitwarden/android/commit/01ac20e6e40f14890ae5a8cf64eeb32346a462da) Adding missing AutomationIDs on LoginPasswordlessRequestListPage (#2693) - [`6f7100a`](https://github.com/bitwarden/android/commit/6f7100ae4f97904a5b5798e7f41b2aa011fc6ca3) lib updates (#2696) - [`a23454b`](https://github.com/bitwarden/android/commit/a23454bc53c5ed4c5871c34f1e4d542bdde248e0) [PM-3508] Fix Release iPhoneSimulator configuration for iOS / Extensions (#2698) - [`bfcfd36`](https://github.com/bitwarden/android/commit/bfcfd367dd169b8fcf52e9448d569aaaf860d155) Trusted Device Encryption feature (#2656) - [`afb8c51`](https://github.com/bitwarden/android/commit/afb8c515d6936ae92b03c05388acdefd78fb130a) [PM-3071] Remove share on save toggle on Send view (#2659) ### 📊 Changes **4 files changed** (+94 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Platforms/Android/Autofill/CredentialProviderSelectionActivity.cs` (+44 -10) 📝 `src/App/Platforms/Android/Autofill/Fido2GetAssertionUserInterface.cs` (+37 -2) 📝 `src/App/Platforms/Android/Services/DeviceActionService.cs` (+12 -0) 📝 `src/Core/Utilities/Fido2/CredentialProviderConstants.cs` (+1 -0) </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 vault timeout immediately on Android Fido2 autofill, where it was locking immediately after user unlocks because changing activity ## 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--> * **CredentialProviderSelectionActivity:** Changed `NoHistory` to `false` so we can launch the `MainActivity` and return to this one. Added the activity launcher so we can launch `MainActivity` to unlock the vault after the user selects the cipher to autofill which confirms unlock on the callback. * **Fido2GetAssertionUserInterface:** Added `_unlockVaultTcs` so we can await until the user unlocks on immediate timeout vaults to ensure vault is unlocked for the Fido2 flow. * **DeviceActionService:** Added a new `CredentialProviderConstants.Fido2CredentialNeedsUnlockingAgainBecauseImmediateTimeout` to have a way to know after unlocking that is because of this scenario and then set the result back. Here a caveat is that we set `vaultTimeoutService.DelayLockAndLogoutMs` in order to maintain a time window of the vault unlocked for this flow. Otherwise it'll be immediately locked after the `MainActivity` is finished. ## 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-04-15 02:31:18 -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#16862