Repository navigation
feat: Settings Integrations tab with Google Search Console connection via Composio - #643
Merged
Merged
Conversation
…tion via Composio (#577)
7 tasks done
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
Adds the Settings → Integrations surface and the Google Search Console connection via Composio managed auth (#577, phase 1 — the connection only; property mapping and data pull follow in #642+).
Server
lib/composio.js— Composio helper gated byisComposioConfigured(); self-host installs without the env vars keep working (the card renders "Not configured" instead of erroring).routes/integrations.jsunder/api/integrations:POST /google-search-console/connect— admin/manager only; validatescallbackUrlby origin againstPUBLIC_APP_URL; returns the Composio-hosted consentredirectUrl.GET /google-search-console/status— resolves live state against ComposioconnectedAccounts.list(not just our row) and syncs the row, so revocation on the Google side is reflected.DELETE /google-search-console— deletes the Composio connected account and clears the row.org_<organizationId>— one connection per organization, visible to teammates.@composio/[email protected]; env:COMPOSIO_API_KEY,COMPOSIO_GSC_AUTH_CONFIG_ID(documented in.env.example). OAuth tokens live in Composio only — never in our DB.Web
components/settings/integrations-section.tsx— card states: Not configured → Connect → Connecting (OAuth popup + 3s status polling with a generation counter, 2-min deadline, popup-blocked same-tab fallback) → Connected (badge + confirm-dialog Disconnect).Integrationsnav entry +?tab=integrationsdeep link (OAuth return lands there).lib/actions/integrations.tsfollowing the existing bearer-token pattern.DB
00045_integration_connections.sql(applied to hosted):integration_connectionswithUNIQUE (organization_id, provider), RLS member select + admin/manager write;types/supabase.tssynced.Related issue
Closes #577
Type of change
feat— New featureHow to test
COMPOSIO_API_KEY(needsconnected_accountswrite) andCOMPOSIO_GSC_AUTH_CONFIG_IDset: Connect opens the Google consent popup; after granting, the card flips to Connected without a reload.Manually tested end-to-end (connect → connected → reload → disconnect) against a real Composio project.
Checklist
feature/)yarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)