Skip to main content
If you’re building an agent, we recommend using sessions instead. See Managed vs custom auth for how to use custom credentials with sessions.
Auth configs control how users authenticate with a toolkit. By default, Composio provides managed credentials for many toolkits. You create a custom auth config when the defaults don’t fit your needs.

When to create a custom auth config

Creating a custom auth config

To create a custom auth config, click Create Auth Config in your dashboard, then navigate to Authentication management → Manage authentication with custom credentials. You’ll need to customize the auth config when you want to use different values than the defaults - such as your own subdomain, base URL, client ID, client secret, etc.
You may change the subdomain for the PostHog toolkit to match your own instance.
PostHog Auth Config Settings

PostHog Auth Config Settings

Toolkits that support OAuth2 allow using your own developer app. This is the recommended approach for most cases.
Use your own developer app!We recommend using your own developer app for the OAuth2 scheme as it is more suited for production usage with many users and more granular control over scopes.However, getting OAuth approvals takes time, so Composio provides a default developer app!

OAuth2 Auth Configs

1

Generate the OAuth Client ID and Client Secret

To set up a custom OAuth config, you’ll need the OAuth Client ID and Client Secret.You can generate the client ID and client secret from the toolkit’s OAuth configuration page.Examples for Google and GitHub:
Google OAuth Configuration

Google OAuth Configuration

2

Set the Authorized Redirect URI

When creating your OAuth app, make sure to configure the Authorized Redirect URI to point to the Composio callback URL below:
Match the redirect URIThe redirect URI in your OAuth app must exactly match oauth_redirect_uri in your Composio auth config. Some toolkit defaults still use https://backend.composio.dev/api/v1/auth-apps/add, which remains supported. To use the URL above, set it explicitly in both places to avoid redirect_uri_mismatch errors.
3

Create the auth config

Once you have the OAuth credentials, you can add them to the auth config in the dashboard.
  1. Select the OAuth2 scheme.
  2. Toggle on Use your own developer credentials.
  3. Enter the OAuth client ID and client secret for your developer app.
  4. Set Redirect URI to the URL registered in your OAuth app.
  5. Click Create!
Auth Config Settings

Auth Config Settings

This auth config is now ready to be used in your application!

Next

Connected accounts