Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
white labelling fixes
Sushmithamallesh committed
Dec 14, 2025 at 18:05 UTC
be54053921821a950b298ed8bb606c3143a0b79f
2 files changed
+25
-14
fern/assets/images/tool-router/auth-config-custom-redirect.png
Binary files /dev/null and b/fern/assets/images/tool-router/auth-config-custom-redirect.png differ
fern/pages/src/tool-router/white-labeling-authentication.mdx
+25
-14
@@ -5,17 +5,19 @@ description: "Use your own OAuth apps and branded auth screens"
5
keywords: "tool router, white-label, oauth, custom auth, branding"
6
---
7
8
-By default, users see Composio's branding on OAuth consent screens:
8
+White-labeling lets you use your own OAuth apps instead of Composio's. Users will see your app name on consent screens instead of "Composio".
9
+
10
+By default, OAuth screens show Composio's branding:
11
12
<Frame>
13
<img src="../../../assets/images/oauth-composio-branding.png" />
14
</Frame>
15
14
-White-labeling lets you show your own app name and logo instead.
16
+With white-labeling, they'll see your app name and logo.
17
18
<Steps>
19
<Step title="Create an OAuth app">
18
-Create a developer app in the toolkit's developer portal. You'll need the client ID, client secret, and set the callback URL to:
20
+Create a developer app in the toolkit's developer portal. You'll need the client ID and client secret. Set the callback URL to:
21
22
```
23
https://backend.composio.dev/api/v3/toolkits/auth/callback
@@ -48,8 +50,8 @@ Pass your auth config ID in the session:
50
51
<CodeGroup>
52
```python
51
-session = await composio.create(
52
- user="user_123",
53
+session = composio.create(
54
+ user_id="user_123",
55
auth_configs={
56
"github": "ac_your_github_config"
57
},
@@ -68,14 +70,14 @@ When users connect GitHub, they'll see your OAuth app's name and logo on the con
70
</Step>
71
</Steps>
72
71
-## Mix white-labeled and Composio managed
73
+## Mixing custom and Composio-managed auth
74
73
-You can white-label some toolkits while using Composio's default credentials for others:
75
+You can white-label some toolkits while using Composio's managed credentials for others:
76
77
<CodeGroup>
78
```python
77
-session = await composio.create(
78
- user="user_123",
79
+session = composio.create(
80
+ user_id="user_123",
81
auth_configs={
82
"github": "ac_your_github_config",
83
"slack": "ac_your_slack_config",
@@ -96,14 +98,16 @@ const session = await composio.create("user_123", {
98
99
## Custom redirect domain
100
99
-By default, users see `backend.composio.dev` in the OAuth flow. To show your own domain:
101
+When users authenticate, they briefly see `backend.composio.dev` in their browser URL. Composio needs to receive the OAuth callback to capture and store the authentication tokens.
102
+
103
+If you need to hide this URL (for enterprise compliance or complete white-labeling), you can proxy the redirect through your own domain:
104
105
1. Set your OAuth app's redirect URI to your domain:
106
```
107
https://yourdomain.com/api/composio-redirect
108
```
109
106
-2. Create an endpoint that forwards to Composio:
110
+2. Create an endpoint that forwards the OAuth callback to Composio:
111
112
<CodeGroup>
113
```python
@@ -114,15 +118,16 @@ app = FastAPI()
118
119
@app.get("/api/composio-redirect")
120
def composio_redirect(request: Request):
121
+ # Forward all OAuth parameters to Composio
122
composio_url = "https://backend.composio.dev/api/v3/toolkits/auth/callback"
118
- query_string = str(request.query_params)
119
- return RedirectResponse(url=f"{composio_url}?{query_string}")
123
+ return RedirectResponse(url=f"{composio_url}?{request.url.query}")
124
```
125
```typescript
126
// pages/api/composio-redirect.ts (Next.js)
127
import type { NextApiRequest, NextApiResponse } from "next";
128
129
export default function handler(req: NextApiRequest, res: NextApiResponse) {
130
+ // Forward all OAuth parameters to Composio
131
const composioUrl = "https://backend.composio.dev/api/v3/toolkits/auth/callback";
132
const params = new URLSearchParams(req.query as Record<string, string>);
133
res.redirect(302, `${composioUrl}?${params.toString()}`);
@@ -130,5 +135,11 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) {
135
```
136
</CodeGroup>
137
133
-3. Update your auth config in the dashboard to use your custom redirect URI.
138
+3. Update your auth config in the Composio dashboard to use your custom redirect URI:
139
+
140
+<Frame caption="Enter your custom redirect URI in the auth config">
141
+ <img src="../../../assets/images/tool-router/auth-config-custom-redirect.png" />
142
+</Frame>
143
+
144
+This makes the OAuth flow go through your domain first, then to Composio for token storage.
145