feat(connectors): add OAuth flow handling with browser redirect and polling#192
Merged
Paveltarno merged 2 commits intopavelta-connectors-push-logicfrom Feb 8, 2026
Merged
Conversation
…olling Add runOAuthFlow function that: - Opens OAuth redirect URL in browser - Polls getOAuthStatus until ACTIVE or FAILED - Returns PENDING on timeout (5 minutes) Uses p-wait-for TimeoutError for robust timeout detection. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.28-pr.192.83d7b55Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.28-pr.192.83d7b55"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.28-pr.192.83d7b55"
}
}
Preview published to npm registry — try new features instantly! |
6 tasks
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
* final connector work sofi 1 * scopes
Paveltarno
added a commit
that referenced
this pull request
Feb 8, 2026
…olling (#192) * feat(connectors): add OAuth flow handling with browser redirect and polling Add runOAuthFlow function that: - Opens OAuth redirect URL in browser - Polls getOAuthStatus until ACTIVE or FAILED - Returns PENDING on timeout (5 minutes) Uses p-wait-for TimeoutError for robust timeout detection. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * connectors: base44 connectors push (#194) * final connector work sofi 1 * scopes --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Paveltarno
added a commit
that referenced
this pull request
Feb 8, 2026
* feat(connectors): implement push logic for syncing connectors Add pushConnectors function that: - Syncs all local connectors via /sync endpoint - Removes upstream-only connectors not in local config - Returns typed results (synced, removed, needs_oauth, error) Includes unit tests covering all scenarios. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(connectors): add OAuth flow handling with browser redirect and polling (#192) * feat(connectors): add OAuth flow handling with browser redirect and polling Add runOAuthFlow function that: - Opens OAuth redirect URL in browser - Polls getOAuthStatus until ACTIVE or FAILED - Returns PENDING on timeout (5 minutes) Uses p-wait-for TimeoutError for robust timeout detection. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * connectors: base44 connectors push (#194) * final connector work sofi 1 * scopes --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Paveltarno
added a commit
that referenced
this pull request
Feb 8, 2026
* feat(connectors): implement push logic for syncing connectors Add pushConnectors function that: - Syncs all local connectors via /sync endpoint - Removes upstream-only connectors not in local config - Returns typed results (synced, removed, needs_oauth, error) Includes unit tests covering all scenarios. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(connectors): add OAuth flow handling with browser redirect and polling (#192) * feat(connectors): add OAuth flow handling with browser redirect and polling Add runOAuthFlow function that: - Opens OAuth redirect URL in browser - Polls getOAuthStatus until ACTIVE or FAILED - Returns PENDING on timeout (5 minutes) Uses p-wait-for TimeoutError for robust timeout detection. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * connectors: base44 connectors push (#194) * final connector work sofi 1 * scopes --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
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.
Note
Description
This PR adds a complete connectors management system to the Base44 CLI, enabling users to configure and push OAuth-based integrations (Google Calendar, Slack, Notion, etc.) to their Base44 apps. It includes the new
base44 connectors pushcommand with interactive OAuth flow handling that opens the user's browser and polls for authorization completion.Related Issue
None
Type of Change
Changes Made
CLI Layer:
src/cli/commands/connectors/index.ts- Parent command for connector managementsrc/cli/commands/connectors/push.ts- Push command with OAuth flow orchestration, user prompts, and summary outputprogram.tsCore Layer:
src/core/resources/connector/oauth.ts-runOAuthFlow()function that opens browser and polls OAuth status (2-minute timeout)src/core/resources/connector/api.ts- RenamedsyncConnectortosetConnector, changed endpoint from POST/syncto PUT/integrations/{type}src/core/resources/connector/push.ts- Adapted to new API endpoint and response formatsrc/core/resources/connector/schema.ts- RenamedOAuthPollingStatustoConnectorOAuthStatus, updated connector status values to lowercase, made error fields nullablesrc/core/resources/connector/config.ts- Removed filename-type validation (no longer required)project/config.ts,project/schema.ts,project/types.ts)Tests:
tests/cli/connectors_push.spec.ts- CLI integration tests covering push scenarios, OAuth flows, and error casestests/core/connectors.spec.ts- Unit tests for OAuth flow with polling behaviortests/cli/testkit/Base44APIMock.tsconnector-type-mismatchfixtureTesting
npm test)Checklist
Additional Notes
base44 connectors pushp-wait-forwithTimeoutErrorfor clean timeout handling (2-minute polling window)🤖 Generated by Claude | 2026-02-08 15:47 UTC