Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
white labelling fixes
Sushmithamalleshbe5405392182
diff --git a/fern/assets/images/tool-router/auth-config-custom-redirect.png b/fern/assets/images/tool-router/auth-config-custom-redirect.pngnew file mode 100644index 000000000..da9a7a4dfBinary files /dev/null and b/fern/assets/images/tool-router/auth-config-custom-redirect.png differdiff --git a/fern/pages/src/tool-router/white-labeling-authentication.mdx b/fern/pages/src/tool-router/white-labeling-authentication.mdxindex 336eb9cea..b524a9fb8 100644--- a/fern/pages/src/tool-router/white-labeling-authentication.mdx+++ b/fern/pages/src/tool-router/white-labeling-authentication.mdx@@ -5,17 +5,19 @@ description: "Use your own OAuth apps and branded auth screens"keywords: "tool router, white-label, oauth, custom auth, branding"----By default, users see Composio's branding on OAuth consent screens:+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".++By default, OAuth screens show Composio's branding:<Frame><img src="../../../assets/images/oauth-composio-branding.png" /></Frame>-White-labeling lets you show your own app name and logo instead.+With white-labeling, they'll see your app name and logo.<Steps><Step title="Create an OAuth app">-Create a developer app in the toolkit's developer portal. You'll need the client ID, client secret, and set the callback URL to:+Create a developer app in the toolkit's developer portal. You'll need the client ID and client secret. Set the callback URL to:```https://backend.composio.dev/api/v3/toolkits/auth/callback@@ -48,8 +50,8 @@ Pass your auth config ID in the session:<CodeGroup>```python-session = await composio.create(- user="user_123",+session = composio.create(+ user_id="user_123",auth_configs={"github": "ac_your_github_config"},@@ -68,14 +70,14 @@ When users connect GitHub, they'll see your OAuth app's name and logo on the con</Step></Steps>-## Mix white-labeled and Composio managed+## Mixing custom and Composio-managed auth-You can white-label some toolkits while using Composio's default credentials for others:+You can white-label some toolkits while using Composio's managed credentials for others:<CodeGroup>```python-session = await composio.create(- user="user_123",+session = composio.create(+ user_id="user_123",auth_configs={"github": "ac_your_github_config","slack": "ac_your_slack_config",@@ -96,14 +98,16 @@ const session = await composio.create("user_123", {## Custom redirect domain-By default, users see `backend.composio.dev` in the OAuth flow. To show your own domain:+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.++If you need to hide this URL (for enterprise compliance or complete white-labeling), you can proxy the redirect through your own domain:1. Set your OAuth app's redirect URI to your domain:```https://yourdomain.com/api/composio-redirect```-2. Create an endpoint that forwards to Composio:+2. Create an endpoint that forwards the OAuth callback to Composio:<CodeGroup>```python@@ -114,15 +118,16 @@ app = FastAPI()@app.get("/api/composio-redirect")def composio_redirect(request: Request):+ # Forward all OAuth parameters to Composiocomposio_url = "https://backend.composio.dev/api/v3/toolkits/auth/callback"- query_string = str(request.query_params)- return RedirectResponse(url=f"{composio_url}?{query_string}")+ return RedirectResponse(url=f"{composio_url}?{request.url.query}")``````typescript// pages/api/composio-redirect.ts (Next.js)import type { NextApiRequest, NextApiResponse } from "next";export default function handler(req: NextApiRequest, res: NextApiResponse) {+ // Forward all OAuth parameters to Composioconst composioUrl = "https://backend.composio.dev/api/v3/toolkits/auth/callback";const params = new URLSearchParams(req.query as Record<string, string>);res.redirect(302, `${composioUrl}?${params.toString()}`);@@ -130,5 +135,11 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) {```</CodeGroup>-3. Update your auth config in the dashboard to use your custom redirect URI.+3. Update your auth config in the Composio dashboard to use your custom redirect URI:++<Frame caption="Enter your custom redirect URI in the auth config">+ <img src="../../../assets/images/tool-router/auth-config-custom-redirect.png" />+</Frame>++This makes the OAuth flow go through your domain first, then to Composio for token storage.