Skip to content

Conversation

@gonengar
Copy link
Contributor

@gonengar gonengar commented Jan 24, 2026

Summary

Implements OAuth connectors management for the Base44 CLI, allowing users to connect external services (Slack, Google Calendar, etc.) via OAuth and track them in the project config.

Commands:

  • base44 connectors add [type] - Initiate OAuth flow and connect an integration
  • base44 connectors list - Show all connectors (local config vs backend status)
  • base44 connectors push - Full sync: connect new, remove missing from config
  • base44 connectors remove [type] - Disconnect an integration (--hard for permanent)

Key features:

  • Connectors stored in config.jsonc under connectors property (not a separate file)
  • Displays OAuth URL for manual browser opening (works in headless environments)
  • Push performs full sync - adds missing connectors and removes ones not in config
  • Space-separated commands matching existing CLI patterns (connectors add not connectors:add)

Example config:

{
  "name": "my-app",
  "connectors": {
    "slack": {},
    "googlecalendar": { "scopes": ["calendar.readonly"] }
  }
}

Supported integrations: Slack, Google Calendar, Google Drive, Gmail, Google Sheets, Google Docs, Google Slides, Notion, Salesforce, HubSpot, LinkedIn, TikTok

@github-actions
Copy link
Contributor

github-actions bot commented Jan 24, 2026

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.0.17-pr.104.e7dd3a1

Prefer not to change any import paths? Install using npm alias so your code still imports base44:

npm i "base44@npm:@base44-preview/cli@0.0.17-pr.104.e7dd3a1"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.0.17-pr.104.e7dd3a1"
  }
}

Preview published to npm registry — try new features instantly!

@gonengar gonengar changed the title Claude/plan oauth connectors j v lav Claude/plan oauth connectors Jan 25, 2026
@gonengar gonengar changed the title Claude/plan oauth connectors Add support for oauth connectors Jan 25, 2026
@claude
Copy link

claude bot commented Jan 25, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

claude added 16 commits January 25, 2026 11:53
Add new CLI commands for managing OAuth integrations:
- `connectors:add [type]` - Connect an OAuth integration (Slack, Google, etc.)
- `connectors:list` - List all connected integrations
- `connectors:remove [type]` - Disconnect an integration

The implementation uses the existing base44 external-auth API endpoints
and stores tokens via Composio (the backend OAuth token storage vendor).

Supported integrations: Slack, Google Calendar, Google Drive, Gmail,
Google Sheets, Google Docs, Google Slides, Notion, Salesforce, HubSpot,
LinkedIn, and TikTok.

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
- Transform StatusResponseSchema to camelCase for consistency with other schemas
- Remove unused removeConnector function (hard delete not needed for CLI)

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
- Re-add removeConnector function for hard delete
- Add --hard option to connectors:remove command
- Soft delete (disconnect) remains the default behavior
- Hard delete permanently removes the connector

Usage:
  base44 connectors:remove slack        # Soft delete (disconnect)
  base44 connectors:remove slack --hard # Hard delete (permanent)

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
Replace table format with simple list:
- ● Slack - user@example.com
- ○ Notion (disconnected)

This removes column width calculations and ANSI padding complexity.

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
Document the new OAuth connectors management commands:
- connectors:add - Connect integrations via OAuth
- connectors:list - List connected integrations
- connectors:remove - Disconnect/remove integrations

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
Connectors are now tracked in a local `base44/connectors.jsonc` file,
similar to how entities are managed. This enables:

- Team collaboration: commit connector config to git
- Declarative setup: define required integrations in code
- Status tracking: see which connectors need to be connected

Changes:
- Add connectors config module for reading/writing local file
- connectors:add now saves to connectors.jsonc after OAuth
- connectors:list shows both local and backend state
- connectors:remove updates both local file and backend
- New connectors:push command to connect pending integrations

Example connectors.jsonc:
```json
{
  "slack": {},
  "googlecalendar": { "scopes": ["calendar.readonly"] }
}
```

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
Change Zod schemas to use .nullish() instead of .optional() to handle
API responses that return null for optional fields.

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
Display the authorization URL for users to click manually, similar to
how the login command works. This is more reliable across different
environments.

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
Changed from `connectors:add` pattern to `connectors add` pattern to match
existing command structure (e.g., `entities push`).

- Updated all connector subcommands to use Command("add") etc.
- Created connectors/index.ts with parent "connectors" command
- Updated help text references throughout
- Updated README documentation

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
Connectors are now stored as a property in the project's config.jsonc
file instead of a separate connectors.jsonc file.

Example config:
```jsonc
{
  "name": "my-app",
  "connectors": {
    "slack": {},
    "googlecalendar": { "scopes": ["calendar.readonly"] }
  }
}
```

- Added connectors property to ProjectConfigSchema
- Updated connectors/config.ts to read/write from main config
- Updated CLI messages and descriptions
- Updated README documentation

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
Push now performs a full sync:
- Connects connectors in local config but not in backend
- Removes connectors in backend but not in local config

Shows a preview of changes before applying:
  + Slack (to connect)
  - Notion (to remove)

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
Aligns with the login flow pattern by wrapping pWaitFor in runTask
for consistent spinner and success/error messaging.

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
Moved POLL_INTERVAL_MS and POLL_TIMEOUT_MS to core/connectors/constants.ts
as OAUTH_POLL_INTERVAL_MS and OAUTH_POLL_TIMEOUT_MS for reuse across
add.ts and push.ts.

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
Updated add.ts and remove.ts to follow the unified command pattern:
- Use ternary-driven flow for flag vs prompt values
- Extract validation into helper functions
- Use cancel() + process.exit(0) for cancelled prompts
- Added --yes flag to remove command to skip confirmation

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
Move duplicate waitForOAuthCompletion logic from add.ts and push.ts
into a shared utility at @core/connectors/oauth.ts. This reduces code
duplication while keeping the polling pattern separate from login
(which has different timeout sources and error handling).

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
Move duplicate fetch logic for local + backend connectors from list.ts,
push.ts, and remove.ts into a shared utility at @core/connectors/state.ts.
Centralizes error handling and parallel fetching in one place.

https://claude.ai/code/session_013jLN9iB2EPcrwsWaUNovsJ
@gonengar gonengar force-pushed the claude/plan-oauth-connectors-jVLav branch from e4898d0 to 354ec9a Compare January 25, 2026 11:56
Consolidate OAuth flow into single runTask with updateMessage callback:
- Removes intermediate "OAuth initiated" checkmark
- Single spinner for entire flow (initiate → URL → poll)
- Cleaner UX with one success message at the end

Also documents the updateMessage pattern in AGENTS.md.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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