[PR #4524] [MERGED] [PM-16120] Defer passkey authentication until vault data is loaded #5012

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/4524
Author: @SaintPatrck
Created: 1/6/2025
Status: Merged
Merged: 1/7/2025
Merged by: @SaintPatrck

Base: mainHead: PM-12259/tde-passkey-user-verification


📝 Commits (1)

  • be11817 [PM-12259] Defer passkey authentication until vault data is loaded

📊 Changes

4 files changed (+184 additions, -54 deletions)

View changed files

📝 app/src/main/java/com/x8bit/bitwarden/data/autofill/fido2/processor/Fido2ProviderProcessorImpl.kt (+12 -4)
📝 app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModel.kt (+8 -8)
📝 app/src/test/java/com/x8bit/bitwarden/data/autofill/fido2/processor/Fido2ProviderProcessorTest.kt (+8 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModelTest.kt (+156 -42)

📄 Description

🎟️ Tracking

PM-16120

📔 Objective

This commit refactors the FIDO2 Get Credentials request handling in Fido2ProviderProcessorImpl to use takeUntilLoaded and fold to collect CipherView data. This ensures querying for matching items is not performed until vault data for the active user is loaded.

We also defer the handling of FIDO2 assertion requests until the vault data is loaded. This ensures the selected item data is available before attempting authentication.

These changes prevent unexpected failures when a passkey authentication request is received while the application is not actively running.

📸 Screenshots

Before After

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 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/4524 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 1/6/2025 **Status:** ✅ Merged **Merged:** 1/7/2025 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `PM-12259/tde-passkey-user-verification` --- ### 📝 Commits (1) - [`be11817`](https://github.com/bitwarden/android/commit/be11817b19486bf0a0022d6f6c738eaacff73a8b) [PM-12259] Defer passkey authentication until vault data is loaded ### 📊 Changes **4 files changed** (+184 additions, -54 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/java/com/x8bit/bitwarden/data/autofill/fido2/processor/Fido2ProviderProcessorImpl.kt` (+12 -4) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModel.kt` (+8 -8) 📝 `app/src/test/java/com/x8bit/bitwarden/data/autofill/fido2/processor/Fido2ProviderProcessorTest.kt` (+8 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModelTest.kt` (+156 -42) </details> ### 📄 Description ## 🎟️ Tracking PM-16120 ## 📔 Objective This commit refactors the FIDO2 Get Credentials request handling in `Fido2ProviderProcessorImpl` to use `takeUntilLoaded` and `fold` to collect `CipherView` data. This ensures querying for matching items is not performed until vault data for the active user is loaded. We also defer the handling of FIDO2 assertion requests until the vault data is loaded. This ensures the selected item data is available before attempting authentication. These changes prevent unexpected failures when a passkey authentication request is received while the application is not actively running. ## 📸 Screenshots | Before | After | |--------|--------| | <video src="https://github.com/user-attachments/assets/98e99c7a-070e-47d0-b38b-2341cfdbb2a5"/> | <video src="https://github.com/user-attachments/assets/1fafee2f-7850-4333-a86b-a99f7f9010c7"/> | ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <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:52:50 -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#5012