@devries-cameron20 / composio-1 / commits / 46a1c70a2
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(sdk): auto-detect OAuth tokens in `AuthScheme` helpers to prevent stuck INITIATED state (#2893)

This PR: - closes [PLEN-1771](https://linear.app/composio/issue/PLEN-1771/importing-existing-connections-gets-stuck-in-initiated) - auto-detect `access_token` in `AuthScheme.OAuth2()` and `oauth_token`+`oauth_token_secret` in `AuthScheme.OAuth1()` to set `status: ACTIVE` instead of always `INITIALIZING`, so token imports create connections directly without a redirect URL - reverse the Python spread order in **all** auth scheme helpers from `{**options, "status": ...}` to `{"status": ..., **options}`, matching the TypeScript convention and allowing user overrides consistently - add `oauth_token_secret` to the TypeScript `OAuth1()` params type (was missing) - fix the Python `oauth2()` docstring typo ("OAuth 1.0" → "OAuth 2.0") - add comprehensive tests for both SDKs: token import → ACTIVE, no token → INITIALIZING, empty string → INITIALIZING, explicit `status` override honored, OAuth1 import with both tokens - add JSDoc/docstrings documenting the auto-detection behavior and how to override

Alberto Schiabel committed Mar 13, 2026 at 09:38 UTC 46a1c70a218d8d2896d531d4e2cb49d7a19c92e8

No changes.