fix: pass authConfigs in getConnectors for custom OAuth connections
Merged
SW
8mo ago+45+45+01234567890123456789-0-0-0123456789
Summary
- Connections created with custom auth configs (TikTok, Instagram) were invisible to
getConnectorsbecause it created Composio sessions without matchingauthConfigs - Composio scopes connection lookups by auth config ā if you authorize with a custom config, you must query with the same config
- Added
buildAuthConfigs()helper that readsCOMPOSIO_TIKTOK_AUTH_CONFIG_IDandCOMPOSIO_INSTAGRAM_AUTH_CONFIG_IDfrom env vars
Test plan
- Added failing test first (TDD red) ā verified
getConnectorsdid NOT passauthConfigs - Applied fix (TDD green) ā test passes
- Existing tests still pass (no regression)
- Verify on preview:
GET /api/connectors?account_id=9105f630-8e9f-4908-a2c4-3f68a6454c78returnsisConnected: truefor TikTok/Instagram
š¤ Generated with Claude Code
Summary by cubic
Fixes getConnectors so TikTok and Instagram connections authorized with custom OAuth are returned. We now pass matching authConfigs from env vars when creating the Composio session.
-
Bug Fixes
- Pass
authConfigsto the Composio session ingetConnectors. - Extract
buildAuthConfigs()module; readsCOMPOSIO_TIKTOK_AUTH_CONFIG_IDandCOMPOSIO_INSTAGRAM_AUTH_CONFIG_ID. - Tests: cover custom OAuth; fix env var cleanup with try/finally.
- Pass
-
Migration
- If you use custom TikTok/Instagram OAuth, set the env vars above. No action needed otherwise.
Summary by CodeRabbit
- New Features
- Added support for configuring TikTok and Instagram connector authentication through environment variables, enabling automatic authentication configuration when initializing these connectors.