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
docs: improve authentication page with video and card styling
Sushmithamallesh50efae7a74ae
diff --git a/docs/app/global.css b/docs/app/global.cssindex 02137fc41..243f55b81 100644--- a/docs/app/global.css+++ b/docs/app/global.css@@ -328,8 +328,12 @@ textarea:focus-visible {outline: none;}-[data-card]:hover {- border-color: color-mix(in srgb, var(--composio-orange) 50%, transparent);+[data-card="true"] {+ background: var(--color-fd-muted);+}++[data-card="true"]:hover {+ border-color: var(--composio-orange);}[data-fumadocs-tabs] [data-state="active"] {diff --git a/docs/content/docs/authentication.mdx b/docs/content/docs/authentication.mdxindex 4031deac3..2b162514c 100644--- a/docs/content/docs/authentication.mdx+++ b/docs/content/docs/authentication.mdx@@ -4,7 +4,9 @@ description: Understand how Tool Router handles user authentication to toolkitskeywords: [connect link, oauth]----Tool Router handles authentication through [Connect Links](/docs/authenticating-tools#hosted-authentication-connect-link), hosted pages where users complete OAuth or enter credentials.+Tool Router handles authentication through Connect Links, hosted pages where users complete OAuth or enter credentials.++<video src="/images/connect-link-auth-flow-recording.mp4" autoPlay loop muted playsInline className="rounded-lg border" />## In-chat authentication@@ -12,45 +14,27 @@ By default, when a tool requires authentication, the agent prompts the user withHere's what this looks like in a conversation:-```-You: Star the composio repo on GitHub--Agent: I need you to connect your GitHub account first.- Please click here to authorize: https://connect.composio.dev/link/ln_abc123+> **You:** Summarize my emails from today+>+> **Agent:** I need you to connect your Gmail account first. Please click here to authorize: https://connect.composio.dev/link/ln_abc123+>+> **You:** Done+>+> **Agent:** Here's a summary of your emails from today...-You: Done+This flow works well for chat applications where users interact directly with the agent.-Agent: Done! I've starred ComposioHQ/composio.-```--This flow works well for chat applications where users interact directly with the agent. See [In-chat authentication](/docs/authenticating-users/in-chat-authentication).+<Card icon={<BookOpen />} title="In-chat authentication" href="/docs/authenticating-users/in-chat-authentication">+ Let the agent handle authentication prompts automatically during conversation+</Card>## Manual authentication-For apps that manage auth outside of chat, use `session.authorize()` to generate Connect Links programmatically:--<Tabs groupId="language" items={['Python', 'TypeScript']} persist>-<Tab value="Python">-```python-connection_request = session.authorize("github")-print(connection_request.redirect_url)-# https://connect.composio.dev/link/ln_abc123-```-</Tab>-<Tab value="TypeScript">-```typescript-import { Composio } from '@composio/core';-const composio = new Composio({ apiKey: 'your_api_key' });-const session = await composio.toolRouter.create('user_123', { toolkits: ['github'] });-// ---cut----const connectionRequest = await session.authorize("github");-console.log(connectionRequest.redirectUrl);-// https://connect.composio.dev/link/ln_abc123-```-</Tab>-</Tabs>--Use this when you want users to connect accounts during onboarding, or when building a custom connections page. See [Manually authenticating users](/docs/authenticating-users/manually-authenticating) for a detailed guide.+For apps that manage auth outside of chat, use `session.authorize()` to generate Connect Links programmatically. This is useful when you want users to connect accounts during onboarding, or when building a custom connections page.++<Card icon={<BookOpen />} title="Manual authentication" href="/docs/authenticating-users/manually-authenticating">+ Generate Connect Links and manage authentication flows in your application+</Card>## How Tool Router manages auth configs@@ -72,4 +56,21 @@ Toolkits without Composio managed auth require a custom auth config. See [Using## White-labeling-Show your own branding on OAuth consent screens by creating your own OAuth app. See [White-labeling authentication](/docs/guides/white-labeling-authentication).+Show your own branding on OAuth consent screens by creating your own OAuth app.++## Next steps++<Cards>+ <Card title="In-chat authentication" href="/docs/authenticating-users/in-chat-authentication">+ Let the agent prompt users to authenticate during conversation+ </Card>+ <Card title="Manual authentication" href="/docs/authenticating-users/manually-authenticating">+ Generate Connect Links programmatically in your app+ </Card>+ <Card title="White-labeling" href="/docs/white-labeling-authentication">+ Customize OAuth screens with your branding+ </Card>+ <Card title="Custom auth configs" href="/docs/using-custom-auth-configuration">+ Use your own OAuth apps with Tool Router+ </Card>+</Cards>diff --git a/docs/content/docs/users-and-sessions.mdx b/docs/content/docs/users-and-sessions.mdxindex 23d7fae14..2e04975c7 100644--- a/docs/content/docs/users-and-sessions.mdx+++ b/docs/content/docs/users-and-sessions.mdx@@ -24,7 +24,7 @@ Let's say you want to allow users to connect both their work and personal email.account ID.Here is a detailed guide on how to manage such connections:-<Card title="Managing Multiple Connections" href="/docs/managing-multiple-connected-accounts" description="Handle multiple accounts per toolkit for a single user" />+<Card icon={<BookOpen />} title="Managing Multiple Connections" href="/docs/managing-multiple-connected-accounts" description="Handle multiple accounts per toolkit for a single user" />## Sessions@@ -96,4 +96,4 @@ const toolkits = await session.toolkits();For details on enabling toolkits, setting auth configs, and using session methods:-<Card title="Configuring Sessions" href="/docs/configuring-sessions" description="Enable toolkits, set auth configs, and select connected accounts" />+<Card icon={<BookOpen />} title="Configuring Sessions" href="/docs/configuring-sessions" description="Enable toolkits, set auth configs, and select connected accounts" />diff --git a/docs/mdx-components.tsx b/docs/mdx-components.tsxindex c2df0b90a..d233047f6 100644--- a/docs/mdx-components.tsx+++ b/docs/mdx-components.tsx@@ -14,6 +14,7 @@ import { ToolTypeFlow, ToolTypeOption } from '@/components/tool-type-selector';import { Figure } from '@/components/figure';import { Video } from '@/components/video';import { CapabilityCard, CapabilityList } from '@/components/capability-card';+import { GuideLink } from '@/components/guide-link';import { ToolkitsLanding } from '@/components/toolkits/toolkits-landing';import { ShieldCheck, Route as RouteIcon } from 'lucide-react';import {@@ -28,6 +29,7 @@ import {Play,Terminal,Palette,+ BookOpen,} from 'lucide-react';export function getMDXComponents(components?: MDXComponents): MDXComponents {@@ -60,6 +62,7 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {Video,CapabilityCard,CapabilityList,+ GuideLink,ToolkitsLanding,// Lucide icons - available globally in MDX without importsShieldCheck,@@ -75,6 +78,7 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {Play,Terminal,Palette,+ BookOpen,...components,};}diff --git a/docs/public/images/connect-link-auth-flow-recording.mp4 b/docs/public/images/connect-link-auth-flow-recording.mp4new file mode 100644index 000000000..40645f12dBinary files /dev/null and b/docs/public/images/connect-link-auth-flow-recording.mp4 differ