[PR #2798] [PM-2671] Update mobile client to use regions #3812

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

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

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

Modify the region selector to store the region in state and use that region to look up the proper URLs.
Add “cleanup” logic on startup to look for the Vault URL in the base URL and set the region appropriately, removing the base URL from state.

Code changes

src/Core/Models/Data/EnvironmentUrlData.cs:
Add missing urls for US and EU clients.

https://github.com/bitwarden/mobile/compare/auth/pm-2671/regions?expand=1#diff-443cceacc227560ece2b5ab7a956287a7737bd46e0cf0d5e9fb081ddd1f515acR113
Add method to migrate old users that don't have region, this will set a region according to their base url saved.

Screenshots

No visual updates.

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/2798 **State:** closed **Merged:** Yes --- ## Type of change - [ ] Bug fix - [ ] New feature development - [X] 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--> Modify the region selector to store the region in state and use that region to look up the proper URLs. Add “cleanup” logic on startup to look for the Vault URL in the base URL and set the region appropriately, removing the base URL from state. ## 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/Core/Models/Data/EnvironmentUrlData.cs**: Add missing urls for US and EU clients. https://github.com/bitwarden/mobile/compare/auth/pm-2671/regions?expand=1#diff-443cceacc227560ece2b5ab7a956287a7737bd46e0cf0d5e9fb081ddd1f515acR113 Add method to migrate old users that don't have region, this will set a region according to their base url saved. ## Screenshots <!--Required for any UI changes. Delete if not applicable--> No visual updates. ## 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:37:27 -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#3812