Repository navigation
fix(oauth): confirm workspace connect links before starting the connection - #9792
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
[Medium impact] The reviewed changes appear safe to merge. SummaryWorkspace connect links now open a confirmation page instead of creating a draft immediately.
|
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. |
waleedlatif1
added a commit
that referenced
this pull request
Nov 7, 2026
Staging's #9792 imports @sim/auth-ui, which the EMCN split replaced with @sim/emcn-auth.
This branch was successfully 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
/api/auth/oauth2/authorize?providerId=&workspaceId=[&credentialId=], and the Instagram equivalent) used to create the connection draft on the GET itself. Anyone can craft that link, and a same-origin hop launders it past the cross-site check from fix(oauth): reject cross-site workspace OAuth launches #9772: email sign-in navigating tocallbackUrl, or client-side redirects such as/oauth/chat-complete?returnTo=/oauth/connectconfirmation page, which shows the provider and the signed-in account. Continue POSTs to the new internalPOST /api/credentials/connectionsroute (session auth, existingcreateCredentialConnectionuse case), which creates the user-bound draft. The page then launchesauthorize?draftId=with the originalcallbackURL. This follows the gesture-gate pattern/desktop/authusesType of Change
Testing
oauth2/authorize,instagram/authorizeandproxytests (92 passing),check:api-validation:strict, biome; the full audit suite and type-check run in CIChecklist
test-auditauthoring gate)🤖 Generated with Claude Code