feat(connectors): add OAuth flow handling with browser redirect and polling#192
Open
Paveltarno wants to merge 1 commit intopavelta-connectors-push-logicfrom
Open
feat(connectors): add OAuth flow handling with browser redirect and polling#192Paveltarno wants to merge 1 commit intopavelta-connectors-push-logicfrom
Paveltarno wants to merge 1 commit intopavelta-connectors-push-logicfrom
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.c5ee3c5Prefer 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.c5ee3c5"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.28-pr.192.c5ee3c5"
}
}
Preview published to npm registry — try new features instantly! |
6 tasks
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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 OAuth flow handling for connectors with browser-based authentication. It introduces a new
runOAuthFlowfunction that opens the OAuth redirect URL in the user's browser and polls the backend API to check the authentication status until it completes (ACTIVE), fails (FAILED), or times out after 5 minutes (PENDING).Related Issue
None
Type of Change
Changes Made
src/core/resources/connector/oauth.tswithrunOAuthFlowfunction that orchestrates the OAuth authentication flowopenpackagegetOAuthStatusAPI endpoint every 2 seconds until status changes from PENDINGp-wait-forwithTimeoutErrorhandling)OAuthPollingStatustoConnectorOAuthStatusfor consistencyTesting
npm test)Checklist
Additional Notes
This PR builds on the existing connector infrastructure (schemas, API client, push logic) by adding the final piece needed for OAuth-based connector authentication. The polling mechanism uses
p-wait-forfor clean timeout handling and returns a structured result indicating both the connector type and final OAuth status.🤖 Generated by Claude | 2026-02-04 12:25 UTC