[PR #2694] [PM-3462] Handle force password reset on mobile with TDE #3744

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

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

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

When a TDE user had their password reset by an admin, the UpdateTempPassword page would show between the SSO login and Login Options screen. This meant that if their device wasn't trusted, they didn't have a User Key to create their new password with.

This sets a ForcePasswordResetReason during the SSO login so that it can be picked up later on the tabs page and removes that navigation from the SSO page.

Other changes

  • This bug was hidden by the EncryptUserKeyWithMasterKeyAsync method creating a new User Key. Since this is too dangerous I've made it explicitly have to be created before passing in.
  • Fixed a key connector bug where we were sending the private key instead of the user key to the server
  • Deprecated ResetMasterPassword on AuthResult
  • Added comments to the navigation logic on the SSO page

Code changes

  • file.ext: Description of what was changed and why

Screenshots

https://github.com/bitwarden/mobile/assets/24985544/ed493b0e-81c1-4a7e-a618-14c2c2857b43

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/2694 **State:** closed **Merged:** Yes --- ## Type of change - [x] Bug fix - [ ] 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--> When a TDE user had their password reset by an admin, the `UpdateTempPassword` page would show between the SSO login and Login Options screen. This meant that if their device wasn't trusted, they didn't have a User Key to create their new password with. This sets a `ForcePasswordResetReason` during the SSO login so that it can be picked up later on the tabs page and removes that navigation from the SSO page. Other changes - This bug was hidden by the `EncryptUserKeyWithMasterKeyAsync` method creating a new User Key. Since this is too dangerous I've made it explicitly have to be created before passing in. - Fixed a key connector bug where we were sending the private key instead of the user key to the server - Deprecated `ResetMasterPassword` on `AuthResult` - Added comments to the navigation logic on the SSO page ## 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--> * **file.ext:** Description of what was changed and why ## Screenshots <!--Required for any UI changes. Delete if not applicable--> https://github.com/bitwarden/mobile/assets/24985544/ed493b0e-81c1-4a7e-a618-14c2c2857b43 ## 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:36:47 -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#3744