feat(credential-groups): add seventeen OAuth providers - #7201
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
All reported issues were addressed across 20 files
You’re at about 99% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Greptile SummaryThis PR expands Credential Groups with seventeen managed OAuth providers and aligns provider availability, scope resolution, identity verification, and picker behavior across the server and client.
Confidence Score: 5/5The PR appears safe to merge. The previously reported cache-shape mismatch has been corrected, and no blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/settings/[section]/prefetch.ts | The prefetch now hydrates the complete contract response, matching every consumer of the shared query key. |
| apps/sim/hooks/queries/utils/credential-group-queries.ts | The shared query utility consistently returns the credential-group settings envelope. |
| apps/sim/hooks/queries/credential-groups.ts | Credential-group queries consume the unified envelope containing groups and provider availability. |
| apps/sim/lib/credential-groups/provider-registry.ts | The provider registry is expanded to define the new managed OAuth providers. |
| apps/sim/lib/auth/connectors/managed-oauth.ts | Managed OAuth handling adds reusable user-info parsing and more flexible token and scope resolution. |
| apps/sim/ee/credential-groups/components/credential-group-details.tsx | The account picker filters by search text and deployment-configured provider availability while preserving configured options. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Settings[Credential Group settings] --> SharedKey[Shared React Query cache]
Prefetch[Server prefetch] -->|Full response envelope| SharedKey
API[Credential Groups API] -->|Groups and available providers| SharedKey
SharedKey --> List[Credential group list]
SharedKey --> Picker[Searchable provider picker]
Picker --> Registry[Provider registry]
Registry --> OAuth[Managed OAuth authorization]
OAuth --> Scope[Granted-scope resolution]
Scope --> Identity[Verified provider identity]
Identity --> Credential[Managed credential enrollment]
Reviews (2): Last reviewed commit: "fix(credential-groups): hydrate the list..." | Re-trigger Greptile
Adds Airtable, Asana, Attio, Box, Cal.com, ClickUp, DocuSign, Dropbox, HubSpot, Linear, LinkedIn, monday.com, Notion, Pipedrive, Salesforce, WordPress.com and Zoom to Credential Groups.
The settings prefetch seeded the shared list key with only the groups array, so every consumer read an empty list for as long as the hydrated value stayed fresh. Also resets the account-type filter when a group opens or closes, alongside the tab it already reset.
91d1d0f to
9684e79
Compare
Summary
createUserInfoManagedOAuthConnector, so a provider contributes aparserather than its own connector factorytokenTypebeing compared against exactlyBearer— RFC 6749 §7.1 makes it case-insensitive, and several providers send lowercasebearer, which was rejected as an incomplete authorizationManagedOAuthScopeResolutionfor providers that report granted scopes somewhere other than the token response. Better Auth derivestokens.scopesfrom the token response'sscopefield, so a provider that omits it yields an empty list and the scope check rejects a grant the user actually approvedscopelessfor Notion, ClickUp and Cal.com, which authorize with an empty scope list and previously tripped the "no scope policy" guard before the flow could startEvery
verifyIdentityis written fresh rather than reusing the connector layer'sgetUserInfo: that one exists to satisfy Better Auth'semail_is_missingguard, so it substitutes a synthetic address when the provider returns none and assertsemailVerified: truein places the provider never verified. Managed enrollment binds a credential to an invited person, so it reports only what the provider proves. LinkedIn now reads the realemail_verifiedclaim.Two deliberate omissions:
Type of Change
Testing
Tested manually.
bun run type-check,bun run lint, and all 37 audits pass; 2202 tests across the credential-group, connector, contract and hook suites pass.Per-provider OAuth walkthroughs still need a live run — the empty granted-scope case in particular only reproduces against a real provider.
Checklist