[PR #2623] [MERGED] [PM-2297] Login with trusted device (Flow 2) #45290

Closed
opened 2026-04-26 12:32:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2623
Author: @andrebispo5
Created: 7/17/2023
Status: Merged
Merged: 7/27/2023
Merged by: @andrebispo5

Base: feature/pm-1208-f3-optionsHead: feature/pm-2297-f2-trusted


📝 Commits (10+)

  • e9ac1e3 [PM-2297] Add DecryptUserKeyWithDeviceKey method
  • 9b6b2c0 [PM-2297] Add methods to DeviceTrustCryptoService update decryption options model
  • 5e1229f [PM-2297] Update account decryption options model
  • 0e45090 [PM-2297] fix TrustedDeviceOption and DeviceResponse model. Change StateService device key get set to have default user id
  • 4e886de [PM-2297] update navigation to decryption options
  • 848e620 [PM-2297] Add missing action navigations to iOS extensions
  • 80eec8d Merge branch 'feature/pm-1208-f3-options' into feature/pm-2297-f2-trusted
  • b7a8e0a Merge branch 'feature/pm-1208-f3-options' into feature/pm-2297-f2-trusted
  • 2465a28 Merge branch 'feature/pm-1208-f3-options' into feature/pm-2297-f2-trusted
  • f12cc69 [PM-2297] Fix trust device bug/typo

📊 Changes

14 files changed (+182 additions, -43 deletions)

View changed files

📝 src/App/Pages/Accounts/LoginApproveDevicePage.xaml.cs (+1 -1)
📝 src/App/Pages/Accounts/LoginApproveDeviceViewModel.cs (+3 -11)
📝 src/App/Pages/Accounts/LoginSsoPage.xaml.cs (+8 -4)
📝 src/App/Pages/Accounts/LoginSsoPageViewModel.cs (+30 -2)
📝 src/Core/Abstractions/IDeviceTrustCryptoService.cs (+2 -0)
📝 src/Core/Models/Domain/AccountDecryptionOptions.cs (+5 -1)
📝 src/Core/Models/Response/DeviceResponse.cs (+1 -1)
📝 src/Core/Services/AuthService.cs (+21 -9)
📝 src/Core/Services/DeviceTrustCryptoService.cs (+27 -1)
📝 src/Core/Services/StateService.cs (+10 -2)
📝 src/Core/Utilities/ServiceContainer.cs (+2 -2)
📝 src/iOS.Autofill/CredentialProviderViewController.cs (+24 -3)
📝 src/iOS.Extension/LoadingViewController.cs (+24 -3)
📝 src/iOS.ShareExtension/LoadingViewController.cs (+24 -3)

📄 Description

Type of change

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

Objective

After an SSO Login with an organisation that has TDE enabled:

  • if the device is trusted, navigate to the users vault and decrypt the user's key with the device key.
  • if the device is not trusted, navigate to the device approval options screen.

Code changes

Additionally to the changes required to do the logic for the objective of the PR, navigations for the device approval options were also added to the iOS extensions.
Models were also updated with additional properties to match server responses.

Screenshots

https://github.com/bitwarden/mobile/assets/4648522/71ed138d-0736-4286-82c8-d955d04c3252

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/2623 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 7/17/2023 **Status:** ✅ Merged **Merged:** 7/27/2023 **Merged by:** [@andrebispo5](https://github.com/andrebispo5) **Base:** `feature/pm-1208-f3-options` ← **Head:** `feature/pm-2297-f2-trusted` --- ### 📝 Commits (10+) - [`e9ac1e3`](https://github.com/bitwarden/android/commit/e9ac1e3b5bf46ce8cbdd30fbbb64d38ff0b71cd0) [PM-2297] Add DecryptUserKeyWithDeviceKey method - [`9b6b2c0`](https://github.com/bitwarden/android/commit/9b6b2c005e7f78f0eaf632c334ea22c61e26d078) [PM-2297] Add methods to DeviceTrustCryptoService update decryption options model - [`5e1229f`](https://github.com/bitwarden/android/commit/5e1229f943efb60feda275be229295b934248ea5) [PM-2297] Update account decryption options model - [`0e45090`](https://github.com/bitwarden/android/commit/0e450904c5dbbf90147970f7ca394303319b687d) [PM-2297] fix TrustedDeviceOption and DeviceResponse model. Change StateService device key get set to have default user id - [`4e886de`](https://github.com/bitwarden/android/commit/4e886de103e7645d88cc71c111b72dbeac4f5e9b) [PM-2297] update navigation to decryption options - [`848e620`](https://github.com/bitwarden/android/commit/848e62064740c5a8fd922367d7a119da172e57b1) [PM-2297] Add missing action navigations to iOS extensions - [`80eec8d`](https://github.com/bitwarden/android/commit/80eec8d81e3a1543304fd547b6634942228c201b) Merge branch 'feature/pm-1208-f3-options' into feature/pm-2297-f2-trusted - [`b7a8e0a`](https://github.com/bitwarden/android/commit/b7a8e0ab07ca504d15adf64751dd4a608a6f1e42) Merge branch 'feature/pm-1208-f3-options' into feature/pm-2297-f2-trusted - [`2465a28`](https://github.com/bitwarden/android/commit/2465a2866750d7a96bd1662413fff78a1b3b947a) Merge branch 'feature/pm-1208-f3-options' into feature/pm-2297-f2-trusted - [`f12cc69`](https://github.com/bitwarden/android/commit/f12cc69b60525b9ea5fb4a8c4f09d404ed3d619d) [PM-2297] Fix trust device bug/typo ### 📊 Changes **14 files changed** (+182 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Accounts/LoginApproveDevicePage.xaml.cs` (+1 -1) 📝 `src/App/Pages/Accounts/LoginApproveDeviceViewModel.cs` (+3 -11) 📝 `src/App/Pages/Accounts/LoginSsoPage.xaml.cs` (+8 -4) 📝 `src/App/Pages/Accounts/LoginSsoPageViewModel.cs` (+30 -2) 📝 `src/Core/Abstractions/IDeviceTrustCryptoService.cs` (+2 -0) 📝 `src/Core/Models/Domain/AccountDecryptionOptions.cs` (+5 -1) 📝 `src/Core/Models/Response/DeviceResponse.cs` (+1 -1) 📝 `src/Core/Services/AuthService.cs` (+21 -9) 📝 `src/Core/Services/DeviceTrustCryptoService.cs` (+27 -1) 📝 `src/Core/Services/StateService.cs` (+10 -2) 📝 `src/Core/Utilities/ServiceContainer.cs` (+2 -2) 📝 `src/iOS.Autofill/CredentialProviderViewController.cs` (+24 -3) 📝 `src/iOS.Extension/LoadingViewController.cs` (+24 -3) 📝 `src/iOS.ShareExtension/LoadingViewController.cs` (+24 -3) </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--> After an SSO Login with an organisation that has TDE enabled: - if the device is trusted, navigate to the users vault and decrypt the user's key with the device key. - if the device is not trusted, navigate to the device approval options screen. ## 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--> Additionally to the changes required to do the logic for the objective of the PR, navigations for the device approval options were also added to the iOS extensions. Models were also updated with additional properties to match server responses. ## Screenshots <!--Required for any UI changes. Delete if not applicable--> https://github.com/bitwarden/mobile/assets/4648522/71ed138d-0736-4286-82c8-d955d04c3252 ## 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-26 12:32:54 -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#45290