Skip to content

[ENG-3881] feat(ConnectProvider): make Salesforce subdomain optional#1602

Merged
dionlow merged 3 commits intomainfrom
feat/salesforce-optional-subdomain
May 5, 2026
Merged

[ENG-3881] feat(ConnectProvider): make Salesforce subdomain optional#1602
dionlow merged 3 commits intomainfrom
feat/salesforce-optional-subdomain

Conversation

@dionlow
Copy link
Copy Markdown
Contributor

@dionlow dionlow commented Apr 30, 2026

Summary

The Salesforce workspace is optional in the OAuth endpoint. This PR updates the UX so that ConnectProvider also allows this interaction.

ConnectProvider-Optional-Salesforce-domain
  • Salesforce OAuth in ConnectProvider now defaults to login.salesforce.com — no subdomain prompt by default. The providerWorkspaceRef field is already optional in the OAuth Connect endpoint.
  • End users can still enter a subdomain via a "Sign in with a custom domain" <details> disclosure on the OAuth landing, for orgs whose admins have disabled login.salesforce.com.
  • Salesforce-specific UI logic is now grouped

Slack context: https://ampersand-company.slack.com/archives/C082KPRN4R4/p1777064901047689

note: This PR does not include testing for UpdateConnection.

Test plan

  • Salesforce in a consumer app: default landing shows "Next" + collapsed disclosure → popup opens against login.salesforce.com
  • Expand disclosure, enter acme → popup opens against https://acme.my.salesforce.com/...; verify providerWorkspaceRef=acme in the /oauth-connect request
  • Expand disclosure, leave empty, click Next → behaves as default (no providerWorkspaceRef sent)
  • Salesforce sandbox provider — same UX; existing sandbox connection now shows "subdomain" label in AuthenticationSection
  • Org with package install URL configured — package install step still renders before the new landing
  • Non-Salesforce providers with workspace metadata — WorkspaceEntryContent unchanged

@dionlow dionlow changed the title feat(ConnectProvider): make Salesforce subdomain optional [ENG-3881] feat(ConnectProvider): make Salesforce subdomain optional Apr 30, 2026
@linear
Copy link
Copy Markdown

linear Bot commented Apr 30, 2026

@dionlow dionlow marked this pull request as ready for review April 30, 2026 18:51
@dionlow dionlow requested a review from jlimatampersand April 30, 2026 18:51
@laurenzlong
Copy link
Copy Markdown
Contributor

Change copy to "Advanced: sign in with custom subdomain"

@dionlow
Copy link
Copy Markdown
Contributor Author

dionlow commented Apr 30, 2026

Copy Suggestion: "Use My Domain (advanced)"

Dion Low and others added 3 commits May 1, 2026 10:34
Default Salesforce OAuth to login.salesforce.com (no subdomain prompt).
End users can still expand a "Sign in with a custom domain" disclosure
to enter a subdomain when their org has disabled login.salesforce.com.

Also consolidates ad-hoc Salesforce checks (startsWith / ===) into a
shared isSalesforceProvider() helper, fixing a latent salesforceSandbox
mislabel in AuthenticationSection.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
WorkspaceEntryContent no longer receives Salesforce providers (OauthFlow2
routes them to SalesforceLandingContent). Remove the now-unreachable
package-install-banner branch, useProviderAppByProvider call, isPending
gate, Stepper inside the form, and the unused `provider` prop.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nced)"

Aligns with Salesforce's official "My Domain" feature name (Setup →
Company Settings → My Domain) so admins recognize it instantly, and the
"(advanced)" parenthetical discourages casual clicks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dionlow dionlow force-pushed the feat/salesforce-optional-subdomain branch from 756b465 to e63d165 Compare May 1, 2026 17:34
@dionlow dionlow merged commit 030967c into main May 5, 2026
4 checks passed
@dionlow dionlow deleted the feat/salesforce-optional-subdomain branch May 5, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants