feat(sso): let an organization keep several identity providers on one domain and choose the primary - #7836
Merged
Conversation
… domain and choose the primary
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sso_domain.primary_provider_idnames the provider sign-in uses. When it's null, behavior is unchanged: the first verified provider by id, so existing orgs see no differenceorganization.sso.set_primary_providerapplication use case (org admin, session) and writes anorganization.sso.primary_provider_changedaudit entry/sso?provider=<id>) for a verified provider waiting beside the primary. Grouping uses the normalized domain@sim/db/sso-primary-provider, so the app and scripts can't driftsso_provider_org_domain_uniqueconcurrently. The deployed release still refuses same-domain providers before writing, so it's safe during cutover. After a rollback, a domain whose chosen primary doesn't sort first falls back to the first provider by idType of Change
Testing
cleanup-table-row-ttlintegration test, which needs a DBlint,check:audits,check:api-validation:strict,docs-manifest:check, repo-widetype-checkandcheck:migrations origin/stagingpassChecklist