[PR #3188] [PM-7553] Implement native app Fido2 credentials #4080

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

Original Pull Request: https://github.com/bitwarden/android/pull/3188

State: closed
Merged: Yes


Type of change

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

Objective

Implement Fido2 credentials autofill and creation from native Android apps.

Code changes

  • Fido2ClientService: Added extra parameters objects to pass additional data like the client data hash and the android package name that is needed for the client data json. Also, added additional logic for the origin validations so they're not performed when the request comes from a native app.
  • CallingAppInfoExtensions: Extracted the CallingAppInfo to Android origin here so it can be reused.
  • CredentialHelpers: Updated the code with the new needed parameters and improved the code when the flows fails. Also updated origin accordingly depending on whether the Origin from the RP is null or not.
  • CredentialProviderSelectionActivity: Updated the code with the new needed parameters and improved the code when the flows fails. Also updated origin accordingly depending on whether the Origin from the RP is null or not. Also changed the response build to be done manually given that the object from the Credentials package was giving some errors.

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
**Original Pull Request:** https://github.com/bitwarden/android/pull/3188 **State:** closed **Merged:** Yes --- ## Type of change - [ ] Bug fix - [X] 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--> Implement Fido2 credentials autofill and creation from native Android apps. ## 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--> * **Fido2ClientService:** Added extra parameters objects to pass additional data like the client data hash and the android package name that is needed for the client data json. Also, added additional logic for the origin validations so they're not performed when the request comes from a native app. * **CallingAppInfoExtensions:** Extracted the `CallingAppInfo` to Android origin here so it can be reused. * **CredentialHelpers:** Updated the code with the new needed parameters and improved the code when the flows fails. Also updated `origin` accordingly depending on whether the `Origin` from the RP is `null` or not. * **CredentialProviderSelectionActivity:** Updated the code with the new needed parameters and improved the code when the flows fails. Also updated `origin` accordingly depending on whether the `Origin` from the RP is `null` or not. Also changed the response build to be done manually given that the object from the Credentials package was giving some errors. ## 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
GiteaMirror added the pull-request label 2025-11-26 23:40:20 -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#4080