-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for oauth connectors #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gonengar
wants to merge
17
commits into
main
Choose a base branch
from
claude/plan-oauth-connectors-jVLav
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,356
−4
Conversation
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
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.17-pr.104.e7dd3a1Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.17-pr.104.e7dd3a1"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.17-pr.104.e7dd3a1"
}
}
Preview published to npm registry — try new features instantly! |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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
e4898d0 to
354ec9a
Compare
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
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
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 integrationbase44 connectors list- Show all connectors (local config vs backend status)base44 connectors push- Full sync: connect new, remove missing from configbase44 connectors remove [type]- Disconnect an integration (--hardfor permanent)Key features:
config.jsoncunderconnectorsproperty (not a separate file)connectors addnotconnectors: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