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

Closed
opened 2026-04-18 13:47:35 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2956
Author: @andrebispo5
Created: 1/25/2024
Status: Merged
Merged: 2/20/2024
Merged by: @andrebispo5

Base: mainHead: auth/pm-4615/duo-frameless


📝 Commits (10+)

  • df242f7 [PM-4615] Update DUO 2FA screen to support DUO frameless flow.
  • 6eb7941 Merge branch 'main' into auth/pm-4615/duo-frameless
  • 543e175 Merge branch 'main' into auth/pm-4615/duo-frameless
  • 0d6c7d6 revert designer changes.
  • 4729d37 [PM-4615] PR review code refactor
  • 552b410 [PM-4615] Change exception message
  • 2c170e7 [PM-4615] Fix Duo and DuoOrg labels
  • b8d67ca [PM-4615] Change label Duo to DUO
  • 036c4de [PM-6310] Update DUO frameless to send back the state value
  • 8cf5a4a [PM-4615] Fix wrong variable name

📊 Changes

5 files changed (+166 additions, -12 deletions)

View changed files

📝 src/Core/Constants.cs (+1 -0)
📝 src/Core/Pages/Accounts/TwoFactorPage.xaml (+22 -4)
📝 src/Core/Pages/Accounts/TwoFactorPageViewModel.cs (+107 -8)
📝 src/Core/Resources/Localization/AppResources.Designer.cs (+27 -0)
📝 src/Core/Resources/Localization/AppResources.resx (+9 -0)

📄 Description

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

🔄 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/2956 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 1/25/2024 **Status:** ✅ Merged **Merged:** 2/20/2024 **Merged by:** [@andrebispo5](https://github.com/andrebispo5) **Base:** `main` ← **Head:** `auth/pm-4615/duo-frameless` --- ### 📝 Commits (10+) - [`df242f7`](https://github.com/bitwarden/android/commit/df242f75e01986edf10ec6a6fd32d3af6d31df79) [PM-4615] Update DUO 2FA screen to support DUO frameless flow. - [`6eb7941`](https://github.com/bitwarden/android/commit/6eb7941d6ca4540f5be904095b9cee538cc10813) Merge branch 'main' into auth/pm-4615/duo-frameless - [`543e175`](https://github.com/bitwarden/android/commit/543e175ea0954a7d72b2fcd044de57b7b2bbc69f) Merge branch 'main' into auth/pm-4615/duo-frameless - [`0d6c7d6`](https://github.com/bitwarden/android/commit/0d6c7d69370fc1e166a1e443e44ca90594f977d8) revert designer changes. - [`4729d37`](https://github.com/bitwarden/android/commit/4729d37a5cebc83cbff9796298f081346630f2cb) [PM-4615] PR review code refactor - [`552b410`](https://github.com/bitwarden/android/commit/552b410297f8d383685f427a1506142cd77c1990) [PM-4615] Change exception message - [`2c170e7`](https://github.com/bitwarden/android/commit/2c170e7a65980724aef4acf71e1d576f20e616a4) [PM-4615] Fix Duo and DuoOrg labels - [`b8d67ca`](https://github.com/bitwarden/android/commit/b8d67ca1dad9833e1a42b19389563eab3ee80449) [PM-4615] Change label Duo to DUO - [`036c4de`](https://github.com/bitwarden/android/commit/036c4dec57aecec2b0559ded184c54eeaecba9d5) [PM-6310] Update DUO frameless to send back the state value - [`8cf5a4a`](https://github.com/bitwarden/android/commit/8cf5a4aec284fba3c75a9aa99dbf3887b478c234) [PM-4615] Fix wrong variable name ### 📊 Changes **5 files changed** (+166 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `src/Core/Constants.cs` (+1 -0) 📝 `src/Core/Pages/Accounts/TwoFactorPage.xaml` (+22 -4) 📝 `src/Core/Pages/Accounts/TwoFactorPageViewModel.cs` (+107 -8) 📝 `src/Core/Resources/Localization/AppResources.Designer.cs` (+27 -0) 📝 `src/Core/Resources/Localization/AppResources.resx` (+9 -0) </details> ### 📄 Description ## 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 --- <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-18 13:47:35 -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#29920