Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 04:30 UTC
docs: add long_redirect_url section, improve redirect headings, add /docs/white-labeling redirect
- Add "Sending users directly to the OAuth provider" section to direct execution white-labeling page - Rename redirect sections on both pages for clarity: "Routing the callback through your domain" - Add 301 redirect from /docs/white-labeling to /docs/white-labeling-authentication - Fix Python code example to use correct ConnectionState structure Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sushmitha Mallesh committed
Mar 4, 2026 at 01:21 UTC
e54aaee13bfaa168e9c8fd405e140ea1e7cf8a20
3 files changed
+60
-7
docs/content/docs/auth-configuration/white-labeling.mdx
+52
-5
@@ -9,13 +9,14 @@ llmGuardrails: "direct-execution"
9
If you're building an agent with sessions, see [White-labeling authentication](/docs/white-labeling-authentication) instead.
10
</Callout>
11
12
-There are three places where Composio branding shows up during authentication:
12
+There are four places where Composio branding shows up during authentication:
13
14
| Where | What users see | How to fix |
15
|-------|---------------|------------|
16
| [**Connect Link page**](#customizing-the-connect-link) | Composio logo and name on the hosted auth page | Change logo + app title in dashboard |
17
| [**OAuth consent screen**](#using-your-own-oauth-apps) | "Composio wants to access your account" on Google, GitHub, etc. | Use your own OAuth app |
18
-| [**Browser address bar**](#custom-redirect-domain) | `backend.composio.dev` flashes during OAuth redirect | Proxy the redirect through your domain |
18
+| [**Outgoing redirect**](#sending-users-directly-to-the-oauth-provider) | `backend.composio.dev` in browser before reaching OAuth provider | Use `long_redirect_url` option |
19
+| [**Return redirect**](#routing-the-callback-through-your-domain) | `backend.composio.dev` flashes when OAuth provider redirects back | Proxy the redirect through your domain |
20
21
## Customizing the Connect Link
22
@@ -126,11 +127,57 @@ For toolkits you haven't white-labeled, use the auth config ID from **Authentica
127
128
For development and testing, Composio's managed auth works fine. No OAuth app setup required.
129
129
-## Custom redirect domain
130
+## Sending users directly to the OAuth provider
131
131
-During OAuth, the browser briefly redirects through `backend.composio.dev` so Composio can capture the auth token. Some toolkits also display this URL on the consent screen.
132
+By default, when you initiate a connection, Composio returns a shortened redirect URL (`backend.composio.dev/api/v3/s/...`). The user's browser hits this URL first, then gets redirected to the OAuth provider. This means `backend.composio.dev` briefly appears in the browser.
133
133
-If you need to hide Composio's domain, you can proxy the redirect through your own domain instead.
134
+To skip this and send users directly to the OAuth provider, pass `long_redirect_url: true` when initiating the connection:
135
+
136
+<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
137
+<Tab value="Python">
138
+```python
139
+from composio import Composio
140
+
141
+composio = Composio(api_key="your_api_key")
142
+
143
+github_conn = composio.connected_accounts.initiate(
144
+ user_id="user_123",
145
+ auth_config_id="ac_your_github_config",
146
+ config={
147
+ "auth_scheme": "OAUTH2",
148
+ "val": {"status": "INITIALIZING", "long_redirect_url": True},
149
+ },
150
+)
151
+print(f"Redirect to: {github_conn.redirect_url}")
152
+```
153
+</Tab>
154
+<Tab value="TypeScript">
155
+```typescript
156
+import { Composio } from '@composio/core';
157
+const composio = new Composio({ apiKey: 'your_api_key' });
158
+// ---cut---
159
+const githubConn = await composio.connectedAccounts.initiate(
160
+ "user_123",
161
+ "ac_your_github_config",
162
+ {
163
+ config: {
164
+ authScheme: "OAUTH2",
165
+ val: { status: "INITIALIZING", long_redirect_url: true },
166
+ },
167
+ },
168
+);
169
+console.log("Redirect to:", githubConn.redirectUrl);
170
+```
171
+</Tab>
172
+</Tabs>
173
+
174
+The redirect URL returned will point directly to the OAuth provider (e.g., `accounts.google.com/o/oauth2/auth?...`) instead of going through Composio first.
175
+
176
+## Routing the callback through your domain
177
+
178
+After the user authorizes, the OAuth provider redirects back through `backend.composio.dev` so Composio can capture the auth token. Some toolkits also display this URL on the consent screen.
179
+
180
+If you need to hide Composio's domain from this return redirect, you can proxy it through your own domain.
181
182
<Steps>
183
<Step>
docs/content/docs/white-labeling-authentication.mdx
+2
-2
@@ -10,7 +10,7 @@ There are three places where Composio branding shows up during authentication:
10
|-------|---------------|------------|
11
| [**Connect Link page**](#customizing-the-connect-link) | Composio logo and name on the hosted auth page | Change logo + app title in dashboard |
12
| [**OAuth consent screen**](#using-your-own-oauth-apps) | "Composio wants to access your account" on Google, GitHub, etc. | Use your own OAuth app |
13
-| [**Browser address bar**](#custom-redirect-domain) | `backend.composio.dev` flashes during OAuth redirect | Proxy the redirect through your domain |
13
+| [**Browser address bar**](#routing-the-callback-through-your-domain) | `backend.composio.dev` flashes during OAuth redirect-back | Proxy the redirect through your domain |
14
15
## Customizing the Connect Link
16
@@ -120,7 +120,7 @@ Now when users connect GitHub or Slack, they'll see your app name on the consent
120
121
For development and testing, Composio's managed auth works fine. No OAuth app setup required.
122
123
-## Custom redirect domain
123
+## Routing the callback through your domain
124
125
During OAuth, the browser briefly redirects through `backend.composio.dev` so Composio can capture the auth token. Some toolkits also display this URL on the consent screen.
126
docs/next.config.mjs
+6
@@ -774,6 +774,12 @@ const config = {
774
destination: '/reference/api-reference',
775
permanent: true,
776
},
777
+ // White-labeling direct execution page redirect
778
+ {
779
+ source: '/docs/white-labeling',
780
+ destination: '/docs/white-labeling-authentication',
781
+ permanent: true,
782
+ },
783
];
784
},
785
};