Skip to content

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

docs: add auth config migration guidance to both white-labeling pages

Sushmitha Mallesh2719497dbc67
diff --git a/docs/content/docs/auth-configuration/white-labeling.mdx b/docs/content/docs/auth-configuration/white-labeling.mdx
index 5460527e7..ebaf2a1e6 100644
--- a/docs/content/docs/auth-configuration/white-labeling.mdx
+++ b/docs/content/docs/auth-configuration/white-labeling.mdx
@@ -127,6 +127,14 @@ For toolkits you haven't white-labeled, use the auth config ID from **Authentica
For development and testing, Composio's managed auth works fine. No OAuth app setup required.
+### Switching from Composio-managed to your own OAuth app
+
+Existing connected accounts are permanently tied to the auth config they were created with. Switching to a custom auth config does not affect them.
+
+- Existing connections keep working. Tokens continue refreshing using the original auth config's credentials.
+- New connections use your custom auth config. Users who connect after the switch will see your app name on the consent screen.
+- To fully migrate a user, delete their old connected account and have them re-authenticate through your OAuth app.
+
## Sending users directly to the OAuth provider
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.
diff --git a/docs/content/docs/white-labeling-authentication.mdx b/docs/content/docs/white-labeling-authentication.mdx
index 19a27e469..2a7981a5a 100644
--- a/docs/content/docs/white-labeling-authentication.mdx
+++ b/docs/content/docs/white-labeling-authentication.mdx
@@ -120,6 +120,45 @@ Now when users connect GitHub or Slack, they'll see your app name on the consent
For development and testing, Composio's managed auth works fine. No OAuth app setup required.
+### Switching from Composio-managed to your own OAuth app
+
+Existing connected accounts are permanently tied to the auth config they were created with. Switching to a custom auth config does not affect them. You have two options:
+
+**Keep existing users as-is.** Just pass `authConfigs` for the toolkits you want to white-label. Users who already have a connection keep using it. Users who need to connect for the first time go through your OAuth app:
+
+<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
+<Tab value="Python">
+```python
+session = composio.create(
+ user_id="user_123",
+ auth_configs={
+ "github": "ac_your_github_config", # new connections use your OAuth app
+ },
+)
+# Existing GitHub connections for this user keep working as before.
+# Only new connections go through your custom OAuth app.
+```
+</Tab>
+<Tab value="TypeScript">
+```typescript
+import { Composio } from '@composio/core';
+const composio = new Composio({ apiKey: 'your_api_key' });
+// ---cut---
+const session = await composio.create("user_123", {
+ authConfigs: {
+ github: "ac_your_github_config", // new connections use your OAuth app
+ },
+});
+// Existing GitHub connections for this user keep working as before.
+// Only new connections go through your custom OAuth app.
+```
+</Tab>
+</Tabs>
+
+Existing users' connections continue using Composio's OAuth client credentials for token refresh until they re-authenticate. Composio does not see or store the user's data.
+
+**Fully migrate all users.** To move every user to your OAuth app, delete their old connected accounts and have them re-authenticate. There is no way to move an existing connection from one auth config to another without re-authentication.
+
## Routing the callback through your domain
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.