[PR #2333] [MERGED] [SG-744] Add claimed domain logic to mobile #3507

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2333
Author: @andrebispo5
Created: 1/30/2023
Status: Merged
Merged: 2/20/2023
Merged by: @andrebispo5

Base: masterHead: feature/SG-744-domain-claiming


📝 Commits (10+)

  • b96f2c9 [SG-744] Add domain claiming endpoint and check on sso login init.
  • 66bff64 [SG-744] refactor endpoint name to match server changes
  • bdb9316 Merge branch 'master' into feature/SG-744-domain-claiming
  • 4725010 PR Fixes
  • 8efe461 PR Fix
  • 26d46c9 [SG-744] Update URL for domain claiming check.
  • 7a4ce7e [SG-744] Save pre login email to state variable
  • 4f29f33 [SG-744] PR fixes. Error messages.
  • 6a916ed [SG-744] add missing resources to pass build
  • f1822e1 [SG-744] Improve error handling

📊 Changes

14 files changed (+140 additions, -7 deletions)

View changed files

📝 src/App/Pages/Accounts/LoginPageViewModel.cs (+1 -0)
📝 src/App/Pages/Accounts/LoginSsoPageViewModel.cs (+53 -2)
📝 src/App/Resources/AppResources.Designer.cs (+9 -0)
📝 src/App/Resources/AppResources.resx (+3 -0)
📝 src/Core/Abstractions/IApiService.cs (+1 -0)
📝 src/Core/Abstractions/IOrganizationService.cs (+2 -0)
📝 src/Core/Abstractions/IStateService.cs (+2 -2)
📝 src/Core/Constants.cs (+1 -0)
src/Core/Models/Request/OrganizationSsoDomainDetailsRequest.cs (+9 -0)
src/Core/Models/Response/OrganizationDomainSsoDetailsResponse.cs (+13 -0)
📝 src/Core/Services/ApiService.cs (+5 -0)
📝 src/Core/Services/OrganizationService.cs (+28 -2)
📝 src/Core/Services/StateService.cs (+12 -0)
📝 src/Core/Utilities/ServiceContainer.cs (+1 -1)

📄 Description

Type of change

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

Objective

Now that we have the ability for domain admins to claim domains, this task will add the logic to each of the clients - which have already had Two-Step Login added - to check the API for the provided domain name on the first step of the login process to see how to handle SSO:
When a domain has been claimed by an organization the “Enterprise Single Sign-On” button on step 2 takes the user directly to the domain specific SSO action and does not require them to enter an org identifier.

Code changes

Add new method to check if the email has an SSO domain claimed.
On login with SSO, in the Init check if the the email has a claimed SSO Domain and automatically jump to the Login.
Note: Due to the difficulty of testing this locally, the code of this new feature will be tested by the QA team and fixes will be done afterwards

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/2333 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 1/30/2023 **Status:** ✅ Merged **Merged:** 2/20/2023 **Merged by:** [@andrebispo5](https://github.com/andrebispo5) **Base:** `master` ← **Head:** `feature/SG-744-domain-claiming` --- ### 📝 Commits (10+) - [`b96f2c9`](https://github.com/bitwarden/android/commit/b96f2c94c1e9b26af727c112f6ca04e138c59882) [SG-744] Add domain claiming endpoint and check on sso login init. - [`66bff64`](https://github.com/bitwarden/android/commit/66bff64db94bf12825f19bbaac7f5ec394c930d9) [SG-744] refactor endpoint name to match server changes - [`bdb9316`](https://github.com/bitwarden/android/commit/bdb93168cac8ca59ea6e6ecc3576da8d1251d5f7) Merge branch 'master' into feature/SG-744-domain-claiming - [`4725010`](https://github.com/bitwarden/android/commit/4725010560b0cdc0374511772cbfbc862f49f148) PR Fixes - [`8efe461`](https://github.com/bitwarden/android/commit/8efe461a626b17cee0cdc649e7d8d0e01ae24911) PR Fix - [`26d46c9`](https://github.com/bitwarden/android/commit/26d46c9cf56f2315c7b65e267f89f6394950b8cb) [SG-744] Update URL for domain claiming check. - [`7a4ce7e`](https://github.com/bitwarden/android/commit/7a4ce7eec05fda3f4ffd7fc315f2a88891c8e207) [SG-744] Save pre login email to state variable - [`4f29f33`](https://github.com/bitwarden/android/commit/4f29f335b18d3591c06b5ed3f91925da5e7b7c88) [SG-744] PR fixes. Error messages. - [`6a916ed`](https://github.com/bitwarden/android/commit/6a916eda064a0f3c9057deb78f3b15a070f74dd1) [SG-744] add missing resources to pass build - [`f1822e1`](https://github.com/bitwarden/android/commit/f1822e17eae9d703b5001360d183296c8e1d292e) [SG-744] Improve error handling ### 📊 Changes **14 files changed** (+140 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Accounts/LoginPageViewModel.cs` (+1 -0) 📝 `src/App/Pages/Accounts/LoginSsoPageViewModel.cs` (+53 -2) 📝 `src/App/Resources/AppResources.Designer.cs` (+9 -0) 📝 `src/App/Resources/AppResources.resx` (+3 -0) 📝 `src/Core/Abstractions/IApiService.cs` (+1 -0) 📝 `src/Core/Abstractions/IOrganizationService.cs` (+2 -0) 📝 `src/Core/Abstractions/IStateService.cs` (+2 -2) 📝 `src/Core/Constants.cs` (+1 -0) ➕ `src/Core/Models/Request/OrganizationSsoDomainDetailsRequest.cs` (+9 -0) ➕ `src/Core/Models/Response/OrganizationDomainSsoDetailsResponse.cs` (+13 -0) 📝 `src/Core/Services/ApiService.cs` (+5 -0) 📝 `src/Core/Services/OrganizationService.cs` (+28 -2) 📝 `src/Core/Services/StateService.cs` (+12 -0) 📝 `src/Core/Utilities/ServiceContainer.cs` (+1 -1) </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--> Now that we have the ability for domain admins to claim domains, this task will add the logic to each of the clients - which have already had Two-Step Login added - to check the API for the provided domain name on the first step of the login process to see how to handle SSO: When a domain has been claimed by an organization the “Enterprise Single Sign-On” button on step 2 takes the user directly to the domain specific SSO action and does not require them to enter an org identifier. ## 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--> Add new method to check if the email has an SSO domain claimed. On login with SSO, in the Init check if the the email has a claimed SSO Domain and automatically jump to the Login. **Note:** Due to the difficulty of testing this locally, the code of this new feature will be tested by the QA team and fixes will be done afterwards ## 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 2025-11-26 23:33:42 -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#3507