fix(sso): require a session to list SSO providers - #8023
Merged
Merged
Conversation
The unauthenticated branch of GET /api/auth/sso/providers returned the domain of every configured provider. Sign-in resolves one address at a time through /api/auth/sso/resolve, so the list now answers 401 without a session. Resolve drops the unused providerType field.
|
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. |
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 was referenced Sep 19, 2026
This branch was previously deployed
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
GET /api/auth/sso/providersreturned the domain of every configured SSO provider to unauthenticated callers. It now answers 401 without a session; signed-in callers still get their own providers, or an organization's when they're an owner/adminPOST /api/auth/sso/resolve, and the settings surfaces are always signed in/api/auth/sso/resolvedrops the unusedproviderTypefield and only returns the provider id the sign-in redirect exposes anyway. Fixed its comment, which relied on the public list existingType of Change
Testing
providers/route.test.ts: 401 before any DB read without a session (red against the old route), own-provider listing with the secret redacted, 403 for a non-admin orgtype-check,lint,check:api-validation:strict,check:audits(47) all passChecklist