[PR #2956] [PM-4615] [PM-6217] Add new DUO frameless 2fa flow #3911

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

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

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

DUO has update their SDK and is moving away from iframe implementation. In order to comply with the new frameless (redirect-based) logic, a new flow was added to the 2FA Viewmodel now leveraging WebAuthenticator for the callback values.

Code changes

  • src/App/Pages/Accounts/TwoFactorPage.xaml: Updated UI with labels and a button to start the DUO flow.
  • src/App/Pages/Accounts/TwoFactorPageViewModel.cs Added new DuoFramelessAuthenticateAsync method to keep the frameless flow logic. This flow is only executed if the server sends AuthUrl as one of the providerData elements.

Screenshots

https://github.com/bitwarden/mobile/assets/4648522/a4a96466-995d-48f9-97fe-4f1a9272c92a

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/2956 **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--> DUO has update their SDK and is moving away from iframe implementation. In order to comply with the new frameless (redirect-based) logic, a new flow was added to the 2FA Viewmodel now leveraging `WebAuthenticator` for the callback values. ## 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--> * **src/App/Pages/Accounts/TwoFactorPage.xaml:** Updated UI with labels and a button to start the DUO flow. * **src/App/Pages/Accounts/TwoFactorPageViewModel.cs** Added new `DuoFramelessAuthenticateAsync` method to keep the frameless flow logic. This flow is only executed if the server sends `AuthUrl` as one of the `providerData` elements. ## Screenshots <!--Required for any UI changes. Delete if not applicable--> https://github.com/bitwarden/mobile/assets/4648522/a4a96466-995d-48f9-97fe-4f1a9272c92a ## 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:38:30 -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#3911