[PR #4547] [MERGED] [PM-15906] Implement single tap passkey flows #5032

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/4547
Author: @SaintPatrck
Created: 1/10/2025
Status: Merged
Merged: 1/23/2025
Merged by: @SaintPatrck

Base: mainHead: PM-15906/single-tap-passkey-flows


📝 Commits (1)

  • 2b329be [PM-15906] Implement single tap passkey flows

📊 Changes

22 files changed (+286 additions, -98 deletions)

View changed files

📝 app/src/main/java/com/x8bit/bitwarden/MainViewModel.kt (+12 -7)
📝 app/src/main/java/com/x8bit/bitwarden/data/autofill/fido2/di/Fido2ProviderModule.kt (+6 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/autofill/fido2/model/Fido2CreateCredentialRequest.kt (+1 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/autofill/fido2/model/Fido2CredentialAssertionRequest.kt (+1 -0)
📝 app/src/main/java/com/x8bit/bitwarden/data/autofill/fido2/processor/Fido2ProviderProcessorImpl.kt (+80 -18)
📝 app/src/main/java/com/x8bit/bitwarden/data/autofill/fido2/util/Fido2IntentUtils.kt (+6 -1)
📝 app/src/main/java/com/x8bit/bitwarden/data/platform/manager/model/FlagKey.kt (+20 -0)
📝 app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/components/FeatureFlagListItems.kt (+5 -0)
📝 app/src/main/res/values/strings.xml (+3 -1)
📝 app/src/test/java/com/x8bit/bitwarden/MainViewModelTest.kt (+13 -8)
📝 app/src/test/java/com/x8bit/bitwarden/data/autofill/fido2/manager/Fido2CredentialManagerTest.kt (+10 -10)
📝 app/src/test/java/com/x8bit/bitwarden/data/autofill/fido2/model/Fido2CredentialAssertionRequestUtil.kt (+2 -0)
📝 app/src/test/java/com/x8bit/bitwarden/data/autofill/fido2/model/Fido2CredentialRequestUtil.kt (+2 -1)
📝 app/src/test/java/com/x8bit/bitwarden/data/autofill/fido2/processor/Fido2ProviderProcessorTest.kt (+72 -22)
📝 app/src/test/java/com/x8bit/bitwarden/data/autofill/fido2/util/Fido2IntentUtilsTest.kt (+7 -5)
📝 app/src/test/java/com/x8bit/bitwarden/data/platform/manager/util/SpecialCircumstanceExtensionsTest.kt (+1 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/DebugMenuViewModelTest.kt (+4 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavViewModelTest.kt (+1 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModelTest.kt (+16 -13)
📝 app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/addedit/util/Fido2CredentialRequestExtensionsTest.kt (+2 -0)

...and 2 more files

📄 Description

🎟️ Tracking

PM-15906
PM-12511
Resolves https://github.com/bitwarden/android/issues/3953

📔 Objective

Add a biometric prompt to the passkey registration and authentication flows.

The biometric prompt will be shown when creating or authenticating with a passkey if the user has supported device biometrics enabled.

This change also adds an isUserVerified flag to the Fido2 requests to determine if the user has verified their identity using the single tap flow.

Note

When vault timeout is set to immediate, users must unlock multiple times. This is intentional since the application is set to lock immediately after backgrounding and the passkey flow requires backgrounding the application after initial unlock and credential discovery.

📸 Screenshots

Device biometrics enabled

Vault timeout not immediate

Case Before After
Create
Auth

Vault timeout set to immediate

Case Before After
Create
Auth

Device biometrics disabled

Vault timeout not immediate

Case Before After
Create
Auth

Vault timeout set to immediate

Case Before After
Create
Auth

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/4547 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 1/10/2025 **Status:** ✅ Merged **Merged:** 1/23/2025 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `PM-15906/single-tap-passkey-flows` --- ### 📝 Commits (1) - [`2b329be`](https://github.com/bitwarden/android/commit/2b329bec27e20d93516e89d7467d77a9d34d3c78) [PM-15906] Implement single tap passkey flows ### 📊 Changes **22 files changed** (+286 additions, -98 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/java/com/x8bit/bitwarden/MainViewModel.kt` (+12 -7) 📝 `app/src/main/java/com/x8bit/bitwarden/data/autofill/fido2/di/Fido2ProviderModule.kt` (+6 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/autofill/fido2/model/Fido2CreateCredentialRequest.kt` (+1 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/autofill/fido2/model/Fido2CredentialAssertionRequest.kt` (+1 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/data/autofill/fido2/processor/Fido2ProviderProcessorImpl.kt` (+80 -18) 📝 `app/src/main/java/com/x8bit/bitwarden/data/autofill/fido2/util/Fido2IntentUtils.kt` (+6 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/data/platform/manager/model/FlagKey.kt` (+20 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/components/FeatureFlagListItems.kt` (+5 -0) 📝 `app/src/main/res/values/strings.xml` (+3 -1) 📝 `app/src/test/java/com/x8bit/bitwarden/MainViewModelTest.kt` (+13 -8) 📝 `app/src/test/java/com/x8bit/bitwarden/data/autofill/fido2/manager/Fido2CredentialManagerTest.kt` (+10 -10) 📝 `app/src/test/java/com/x8bit/bitwarden/data/autofill/fido2/model/Fido2CredentialAssertionRequestUtil.kt` (+2 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/data/autofill/fido2/model/Fido2CredentialRequestUtil.kt` (+2 -1) 📝 `app/src/test/java/com/x8bit/bitwarden/data/autofill/fido2/processor/Fido2ProviderProcessorTest.kt` (+72 -22) 📝 `app/src/test/java/com/x8bit/bitwarden/data/autofill/fido2/util/Fido2IntentUtilsTest.kt` (+7 -5) 📝 `app/src/test/java/com/x8bit/bitwarden/data/platform/manager/util/SpecialCircumstanceExtensionsTest.kt` (+1 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/debugmenu/DebugMenuViewModelTest.kt` (+4 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavViewModelTest.kt` (+1 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModelTest.kt` (+16 -13) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/addedit/util/Fido2CredentialRequestExtensionsTest.kt` (+2 -0) _...and 2 more files_ </details> ### 📄 Description ## 🎟️ Tracking PM-15906 PM-12511 Resolves https://github.com/bitwarden/android/issues/3953 ## 📔 Objective Add a biometric prompt to the passkey registration and authentication flows. The biometric prompt will be shown when creating or authenticating with a passkey if the user has supported device biometrics enabled. This change also adds an `isUserVerified` flag to the Fido2 requests to determine if the user has verified their identity using the single tap flow. > [!NOTE] > When vault timeout is set to immediate, users must unlock multiple times. This is intentional since the application is set to lock immediately after backgrounding and the passkey flow requires backgrounding the application after initial unlock and credential discovery. ## 📸 Screenshots ### Device biometrics enabled #### Vault timeout **not** `immediate` | Case | Before | After | |--------|--------|--------| | Create | <video src="https://github.com/user-attachments/assets/5adc9e33-daeb-4fdb-bfba-205c1f862a08"/> | <video src="https://github.com/user-attachments/assets/825c10e0-a3b2-46c9-b346-dce6786761fe"/> | | Auth | <video src="https://github.com/user-attachments/assets/1c0ea461-d586-4b50-9e1d-8e4b242b70ca"/> | <video src="https://github.com/user-attachments/assets/c6d743bb-3e4f-4cc1-ad93-f5b1f95a9f91"/> | #### Vault timeout set to `immediate` | Case | Before | After | |--------|--------|--------| | Create | <video src=""/> | <video src="https://github.com/user-attachments/assets/45dadedf-4286-40d3-ab6b-7b7ead1bd416"/> | | Auth | <video src=""/> | <video src="https://github.com/user-attachments/assets/675932e8-55d3-418e-8047-ae080e4ea928"/> | ### Device biometrics disabled #### Vault timeout **not** `immediate` | Case | Before | After | |--------|--------|--------| | Create | <video src=""/> | <video src="https://github.com/user-attachments/assets/dd63c01e-0497-4164-9d5d-70f2da9178e0"/> | | Auth | <video src=""/> | <video src="https://github.com/user-attachments/assets/bf529772-1865-4174-88f6-0cd1d229ffb3"/> | #### Vault timeout set to `immediate` | Case | Before | After | |--------|--------|--------| | Create | <video src=""/> | <video src="https://github.com/user-attachments/assets/516e7e2b-255e-4389-8cea-b47efe1ace41"/> | | Auth | <video src=""/> | <video src="https://github.com/user-attachments/assets/348b0e2c-a9e7-43cd-be88-ab9f0245d511"/> | ## ⏰ 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:53:07 -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#5032