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, 22:00 UTC
docs: Fix high-priority issues in programmatic auth config documentation
- Fix toolkit consistency in TypeScript example (LINEAR → GITHUB) - Add credential examples in snippet files instead of empty objects - Polish language for professional tone and clarity - Improve callback URI formatting with proper code block Co-authored-by: Siddharth Balyan <alt-glitch@users.noreply.github.com>
claude[bot] committed
Jul 4, 2025 at 23:15 UTC
d2cc0b8f17b6a44ec69bba67aad63dbb335ad659
3 files changed
+18
-10
fern/pages/src/authentication/programmatic-auth-configs.mdx
+12
-8
@@ -6,7 +6,7 @@ keywords: ""
6
hide-nav-links: true
7
---
8
9
-Auth configs are created once and reused many times. However, when dealing with many toolkits, you may want to create auth configs programmatically.
9
+Auth configs are created once and reused many times. However, when managing multiple toolkits, you may want to create auth configs programmatically.
10
11
- When creating and destroying auth configs multiple times in your app's lifecycle.
12
- When creating auth configs for your users' users.
@@ -14,7 +14,7 @@ Auth configs are created once and reused many times. However, when dealing with
14
## OAuth2 based apps
15
16
### Using Composio Default Auth
17
-Since OAuth2 is the most common auth type for apps, Composio provides managed auth for most OAuth2 based apps.
17
+Since OAuth2 is the most common authentication type for applications, Composio provides managed auth for most OAuth2 based applications.
18
This is to speed up development and prototyping.
19
This means you don't have to provide your own OAuth credentials.
20
@@ -39,8 +39,8 @@ import { Composio } from "@composio/core";
39
40
const composio = new Composio();
41
42
-const authConfig = await composio.authConfigs.create("LINEAR", {
43
- name: "Linear",
42
+const authConfig = await composio.authConfigs.create("GITHUB", {
43
+ name: "GitHub",
44
type: "use_composio_managed_auth",
45
});
46
@@ -48,7 +48,7 @@ console.log(authConfig);
48
```
49
</CodeGroup>
50
51
-The `auth_config_id` should be stored securely in your database for future use to be created and destroyed multiple times.
51
+The returned `auth_config_id` should be stored securely in your database for future use to be created and destroyed multiple times.
52
53
You can also provide your own authentication details. The required `credentials` and `authScheme` depend on the auth type.
54
@@ -96,7 +96,11 @@ The process of setting up your own OAuth2 credentials usually involves generatin
96
The **authorized redirect URI** is the URI that captures the OAuth code that is returned to the app.
97
</Tip>
98
99
-While doing so, you must ensure to set the **authorized redirect URI** in the OAuth configuration to: `https://backend.composio.dev/api/v3/toolkits/auth/callback`.
99
+While doing so, you must ensure to set the **authorized redirect URI** in the OAuth configuration to:
100
+
101
+```
102
+https://backend.composio.dev/api/v3/toolkits/auth/callback
103
+```
104
<Tabs>
105
<Tab title="Redirect URI for GitHub">
106
<Frame>
@@ -111,7 +115,7 @@ While doing so, you must ensure to set the **authorized redirect URI** in the OA
115
</Tabs>
116
117
### Specifying scopes
114
-Composio requests a set of _good_ default OAuth2 scopes for each toolkit wherever possible. However, you can override or modify these scopes by passing a `scopes` field to the `credentials` object.
118
+Composio requests a set of appropriate default OAuth2 scopes for each toolkit wherever possible. However, you can override or modify these scopes by passing a `scopes` field to the `credentials` object.
119
120
<CodeGroup>
121
<SnippetCode
@@ -135,7 +139,7 @@ Composio requests a set of _good_ default OAuth2 scopes for each toolkit whereve
139
140
141
## Other auth types
138
-Composio has plenty of other applications that use different auth types like API keys, Bearer tokens, JWT and even no auth at all.
142
+Composio supports many applications that use different authentication types like API keys, Bearer tokens, JWT and even no authentication at all.
143
144
Generating the auth config for other auth types only has minor differences.
145
- `use_custom_auth` is used instead of `use_composio_managed_auth`
fern/snippets/authentication/python/auth-config.py
+3
-1
@@ -8,7 +8,9 @@ auth_config = composio.auth_configs.create(
8
options={
9
"type": "use_custom_auth",
10
"auth_scheme": "API_KEY",
11
- "credentials": {}
11
+ "credentials": {
12
+ "api_key": "your_api_key_here"
13
+ }
14
},
15
)
16
print(auth_config)
fern/snippets/authentication/typescript/auth-config.ts
+3
-1
@@ -5,7 +5,9 @@ const composio = new Composio();
5
const authConfig = await composio.authConfigs.create('PERPLEXITYAI', {
6
name: 'Perplexity AI',
7
type: 'use_custom_auth',
8
- credentials: {},
8
+ credentials: {
9
+ api_key: 'your_api_key_here',
10
+ },
11
authScheme: 'API_KEY',
12
});
13