diff --git a/auth4genai/async-authorization/langgraph/get-started/asynchronous-authorization.mdx b/auth4genai/async-authorization/langgraph/get-started/asynchronous-authorization.mdx new file mode 100644 index 000000000..9453d19bc --- /dev/null +++ b/auth4genai/async-authorization/langgraph/get-started/asynchronous-authorization.mdx @@ -0,0 +1,41 @@ +--- +title: Secure Human-in-the-Loop Approvals +description: Learn how Auth for GenAI enables AI agents to asynchronously authorize users. +sidebarTitle: Secure HITL Approvals +--- + +import LangChainAsyncAuth from "/snippets/get-started/langchain-next-js/async-auth.mdx"; +import LangChainFastAPIAsyncAuth from "/snippets/get-started/langchain-fastapi-py/async-auth.mdx"; + +Auth for GenAI enables AI agents to asynchronously authorize users using the [Client-Initiated Backchannel Authentication Flow (CIBA)](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-initiated-backchannel-authentication-flow). AI agents can work in the background, only notifying the user when needed for critical actions. + +When you add secure [human-in-the-loop approvals](https://sdk.vercel.ai/cookbook/next/human-in-the-loop) to your AI agent workflows, you can use Auth0 to request the user's permission to complete an authorization request. The AI agent can render [rich authorization data](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-initiated-backchannel-authentication-flow/user-authorization-with-ciba) in the consent prompt so the user knows exactly what they're authorizing. + +By the end of this quickstart, you should have an AI agent integrated with the [Auth0 AI SDK](https://github.com/auth0-lab/auth0-ai-js) that can request to buy products from an online shop on the user's behalf. + +## Pick your tech stack + + + + + + + + + + +## Next steps + +You have successfully added an authorization step to protect tool calling in asynchronous AI agents. For next steps: + +- [Asynchronous Authorization docs](/intro/asynchronous-authorization). +- Learn more about the [Client-Initiated Backchannel Authentication Flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-initiated-backchannel-authentication-flow). +- Learn how to [Configure Rich Authorization Requests](https://auth0.com/docs/get-started/apis/configure-rich-authorization-requests). +- Learn more about [Auth0 Guardian Android SDK](https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/guardian-for-android-sdk). +- Learn more about [Auth0 Guardian iOS SDK](https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/guardian-for-ios-sdk). diff --git a/auth4genai/async-authorization/langgraph/intro/asynchronous-authorization.mdx b/auth4genai/async-authorization/langgraph/intro/asynchronous-authorization.mdx new file mode 100644 index 000000000..2770346cb --- /dev/null +++ b/auth4genai/async-authorization/langgraph/intro/asynchronous-authorization.mdx @@ -0,0 +1,7 @@ +--- +title: Asynchronous Authorization +description: 'Asynchronous Authorization provides a secure "human-in-the-loop" mechanism, allowing agents to work autonomously in the background and seek user consent for sensitive or critical actions only when necessary.' +--- +import Intro from "/snippets/intros/asynchronous-authorization.mdx"; + + diff --git a/auth4genai/async-authorization/langgraph/intro/ciba-rar.mdx b/auth4genai/async-authorization/langgraph/intro/ciba-rar.mdx new file mode 100644 index 000000000..98f3a26ff --- /dev/null +++ b/auth4genai/async-authorization/langgraph/intro/ciba-rar.mdx @@ -0,0 +1,9 @@ +--- +title: Understanding CIBA & RAR +description: This article explains how Auth0 supports asynchronous authorization using the Client-Initiated Backchannel Authentication (CIBA) standard, enhanced with Rich Authorization Requests (RAR) +sidebarTitle: CIBA & RAR Overview +--- + +import Intro from "/snippets/intros/ciba-rar.mdx"; + + diff --git a/auth4genai/async-authorization/vercel-ai/get-started/asynchronous-authorization.mdx b/auth4genai/async-authorization/vercel-ai/get-started/asynchronous-authorization.mdx new file mode 100644 index 000000000..f6dd05d46 --- /dev/null +++ b/auth4genai/async-authorization/vercel-ai/get-started/asynchronous-authorization.mdx @@ -0,0 +1,41 @@ +--- +title: Secure Human-in-the-Loop Approvals +description: Learn how Auth for GenAI enables AI agents to asynchronously authorize users. +sidebarTitle: Secure HITL Approvals +--- + +import VercelAsyncAuth from "/snippets/get-started/vercel-ai-next-js/async-auth.mdx"; +import VercelNodeAsyncAuth from "/snippets/get-started/vercel-ai-node-js/async-auth.mdx"; + +Auth for GenAI enables AI agents to asynchronously authorize users using the [Client-Initiated Backchannel Authentication Flow (CIBA)](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-initiated-backchannel-authentication-flow). AI agents can work in the background, only notifying the user when needed for critical actions. + +When you add secure [human-in-the-loop approvals](https://sdk.vercel.ai/cookbook/next/human-in-the-loop) to your AI agent workflows, you can use Auth0 to request the user's permission to complete an authorization request. The AI agent can render [rich authorization data](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-initiated-backchannel-authentication-flow/user-authorization-with-ciba) in the consent prompt so the user knows exactly what they're authorizing. + +By the end of this quickstart, you should have an AI agent integrated with the [Auth0 AI SDK](https://github.com/auth0-lab/auth0-ai-js) that can request to buy products from an online shop on the user's behalf. + +## Pick your tech stack + + + + + + + + + + +## Next steps + +You have successfully added an authorization step to protect tool calling in asynchronous AI agents. For next steps: + +- [Asynchronous Authorization docs](/intro/asynchronous-authorization). +- Learn more about the [Client-Initiated Backchannel Authentication Flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-initiated-backchannel-authentication-flow). +- Learn how to [Configure Rich Authorization Requests](https://auth0.com/docs/get-started/apis/configure-rich-authorization-requests). +- Learn more about [Auth0 Guardian Android SDK](https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/guardian-for-android-sdk). +- Learn more about [Auth0 Guardian iOS SDK](https://auth0.com/docs/secure/multi-factor-authentication/auth0-guardian/guardian-for-ios-sdk). diff --git a/auth4genai/async-authorization/vercel-ai/intro/asynchronous-authorization.mdx b/auth4genai/async-authorization/vercel-ai/intro/asynchronous-authorization.mdx new file mode 100644 index 000000000..2770346cb --- /dev/null +++ b/auth4genai/async-authorization/vercel-ai/intro/asynchronous-authorization.mdx @@ -0,0 +1,7 @@ +--- +title: Asynchronous Authorization +description: 'Asynchronous Authorization provides a secure "human-in-the-loop" mechanism, allowing agents to work autonomously in the background and seek user consent for sensitive or critical actions only when necessary.' +--- +import Intro from "/snippets/intros/asynchronous-authorization.mdx"; + + diff --git a/auth4genai/async-authorization/vercel-ai/intro/ciba-rar.mdx b/auth4genai/async-authorization/vercel-ai/intro/ciba-rar.mdx new file mode 100644 index 000000000..98f3a26ff --- /dev/null +++ b/auth4genai/async-authorization/vercel-ai/intro/ciba-rar.mdx @@ -0,0 +1,9 @@ +--- +title: Understanding CIBA & RAR +description: This article explains how Auth0 supports asynchronous authorization using the Client-Initiated Backchannel Authentication (CIBA) standard, enhanced with Rich Authorization Requests (RAR) +sidebarTitle: CIBA & RAR Overview +--- + +import Intro from "/snippets/intros/ciba-rar.mdx"; + + diff --git a/auth4genai/authorization-for-rag/langgraph/get-started/authorization-for-rag.mdx b/auth4genai/authorization-for-rag/langgraph/get-started/authorization-for-rag.mdx new file mode 100644 index 000000000..6280f9fc4 --- /dev/null +++ b/auth4genai/authorization-for-rag/langgraph/get-started/authorization-for-rag.mdx @@ -0,0 +1,52 @@ +--- +title: Authorization for RAG +description: "Learn how Auth for GenAI enables AI agents to implement fine-grained authorization for Retrieval Augmented Generation (RAG)." +mode: "wide" +--- + +import LangChainNextjsAuthForRag from "/snippets/get-started/langchain-next-js/auth-for-rag.mdx"; +import LangChainNodejsAuthForRag from "/snippets/get-started/langchain-node-js/auth-for-rag.mdx"; +import LangChainFastapiAuthForRag from "/snippets/get-started/langchain-fastapi-py/auth-for-rag.mdx"; +import LangChainPythonAuthForRag from "/snippets/get-started/langchain-py/auth-for-rag.mdx"; + +Auth for GenAI leverages [Auth0 FGA](https://auth0.com/fine-grained-authorization) to provide fine-grained authorization control for AI agents. As a result, when AI agents use Retrieval Augmented Generation (RAG) to provide sophisticated, relevant responses to user queries, they only have access to authorized data. + +By the end of this quickstart, you should have an AI application that can: + +1. Retrieve authorized data as context for a RAG pipeline. +2. Use Auth0 FGA to determine if the user has authorization for the data. + +## Pick your tech stack + + + + + + + + + + + + + + + + +## Next steps + +- [Authorization for RAG docs](/intro/authorization-for-rag) +- Learn how to use [Auth0 FGA](https://auth0.com/fine-grained-authorization) to create a Relationship-Based Access Control (ReBAC) authorization model. +- Learn more about [OpenFGA](https://openfga.dev/docs/fga). diff --git a/auth4genai/authorization-for-rag/langgraph/intro/authorization-for-rag.mdx b/auth4genai/authorization-for-rag/langgraph/intro/authorization-for-rag.mdx new file mode 100644 index 000000000..133e1b17d --- /dev/null +++ b/auth4genai/authorization-for-rag/langgraph/intro/authorization-for-rag.mdx @@ -0,0 +1,3 @@ +import Intro from "/snippets/intros/authorization-for-rag.mdx"; + + diff --git a/auth4genai/authorization-for-rag/vercel-ai/get-started/authorization-for-rag.mdx b/auth4genai/authorization-for-rag/vercel-ai/get-started/authorization-for-rag.mdx new file mode 100644 index 000000000..960e7a602 --- /dev/null +++ b/auth4genai/authorization-for-rag/vercel-ai/get-started/authorization-for-rag.mdx @@ -0,0 +1,31 @@ +--- +title: Authorization for RAG +description: "Learn how Auth for GenAI enables AI agents to implement fine-grained authorization for Retrieval Augmented Generation (RAG)." +mode: "wide" +--- + +import VercelNextjsAuthForRag from "/snippets/get-started/vercel-ai-next-js/auth-for-rag.mdx"; + +Auth for GenAI leverages [Auth0 FGA](https://auth0.com/fine-grained-authorization) to provide fine-grained authorization control for AI agents. As a result, when AI agents use Retrieval Augmented Generation (RAG) to provide sophisticated, relevant responses to user queries, they only have access to authorized data. + +By the end of this quickstart, you should have an AI application that can: + +1. Retrieve authorized data as context for a RAG pipeline. +2. Use Auth0 FGA to determine if the user has authorization for the data. + +## Pick your tech stack + + + + + + + +## Next steps + +- [Authorization for RAG docs](/intro/authorization-for-rag) +- Learn how to use [Auth0 FGA](https://auth0.com/fine-grained-authorization) to create a Relationship-Based Access Control (ReBAC) authorization model. +- Learn more about [OpenFGA](https://openfga.dev/docs/fga). diff --git a/auth4genai/authorization-for-rag/vercel-ai/intro/authorization-for-rag.mdx b/auth4genai/authorization-for-rag/vercel-ai/intro/authorization-for-rag.mdx new file mode 100644 index 000000000..133e1b17d --- /dev/null +++ b/auth4genai/authorization-for-rag/vercel-ai/intro/authorization-for-rag.mdx @@ -0,0 +1,3 @@ +import Intro from "/snippets/intros/authorization-for-rag.mdx"; + + diff --git a/auth4genai/build-with-ai/using-ai-tools.mdx b/auth4genai/build-with-ai/using-ai-tools.mdx index 3b438655a..115e19323 100644 --- a/auth4genai/build-with-ai/using-ai-tools.mdx +++ b/auth4genai/build-with-ai/using-ai-tools.mdx @@ -110,7 +110,7 @@ To learn more, read [Installing MCP servers](https://docs.anthropic.com/en/docs/ To use the Auth for GenAI MCP Server with Claude: - 1. Navigate to the [Connectors](https://claude.ai/settings/connectors) page in the Claude settings. + 1. Navigate to the [Connectors](https://claude.ai/settings/connectors) page in the Claude settings. 2. Select **Add custom connector**. 3. Add the Auth for GenAI MCP Server: - Name: `Auth for GenAI` @@ -128,7 +128,7 @@ To learn more, read the [Model Context Protocol documentation](https://modelcont ## How to use the Auth for GenAI Docs MCP server -After adding the MCP server to your AI tool, you can ask it questions about how to set up, configure, or integrate with Auth for GenAI. AI coding agents will be able to automatically retrieve the matching documentation for steps, references, and examples when applying code changes. +After adding the MCP server to your AI tool, you can ask it questions about how to set up, configure, or integrate with Auth for GenAI. AI coding agents will be able to automatically retrieve the matching documentation for steps, references, and examples when applying code changes. ### Sample prompts Use these sample prompts to get a quick response, start building a new app, or integrate functionality into your existing app: @@ -137,4 +137,4 @@ Use these sample prompts to get a quick response, start building a new app, or i - Add a tool call to my AI agent that will access the user's Google calendar and answer questions about their schedule and meetings. Use the Auth for GenAI MCP Server to find and follow the instructions on using Auth0 to securely call the Google API using the user's credentials. - Build me a Next.js AI chatbot app that uses Langgraph to make tool calls to Google Calendar. Use Auth0 for user login and to secure the tool calls to the user's calendar. Use the Auth for GenAI MCP Server for instructions. -Even with access to the most up-to-date documentation, AI tools can make mistakes. Always review AI-generated code for accuracy. \ No newline at end of file +Even with access to the most up-to-date documentation, AI tools can make mistakes. Always review AI-generated code for accuracy. diff --git a/auth4genai/calling-apis/cloudflare/get-started/call-your-apis-on-users-behalf.mdx b/auth4genai/calling-apis/cloudflare/get-started/call-your-apis-on-users-behalf.mdx new file mode 100644 index 000000000..78eadb959 --- /dev/null +++ b/auth4genai/calling-apis/cloudflare/get-started/call-your-apis-on-users-behalf.mdx @@ -0,0 +1,31 @@ +--- +title: Calling first-party APIs +description: Learn how Auth for GenAI enables AI agents to call first-party APIs on the user's behalf. +mode: "wide" +--- + +import CloudflareCallYourApi from "/snippets/get-started/cloudflare-agents-js/call-your-api.mdx"; + +Let your AI agent call your APIs on behalf of the authenticated user using access tokens securely issued by Auth0. Your API can be any [API that you have configured in Auth0](https://auth0.com/docs/get-started/apis). + +By the end of this quickstart, you should have an AI application integrated with Auth0 that can: + +- Get an Auth0 access token. +- Use the Auth0 access token to make a tool call to your API endpoint, in this case, Auth0's `/userinfo` endpoint. +- Return the data to the user via an AI agent. + +## Pick your tech stack + + + + + + + +## Next steps + +- [Call your APIs on user's behalf docs](/calling-apis/cloudflare/intro/call-your-apis-on-users-behalf). +- To set up third-party tool calling, complete the + [Call other's APIs on user's behalf](/calling-apis/cloudflare/intro/call-others-apis-on-users-behalf) quickstart. +- To explore the Auth0 Next.js SDK, see the + [Github repo](https://github.com/auth0/nextjs-auth0). diff --git a/auth4genai/calling-apis/cloudflare/how-tos/check-google-calendar-availability.mdx b/auth4genai/calling-apis/cloudflare/how-tos/check-google-calendar-availability.mdx new file mode 100644 index 000000000..035931d64 --- /dev/null +++ b/auth4genai/calling-apis/cloudflare/how-tos/check-google-calendar-availability.mdx @@ -0,0 +1,32 @@ +--- +title: Check Google Calendar Availability +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to check your Google Calendar availability." +mode: "wide" +--- + +import CloudflareAgents from "/snippets/how-tos/google-calendar/cloudflare-agents.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Set up and configure a Google Cloud project: + - Enable the [Google Calendar API](https://console.cloud.google.com/apis/library/calendar-json.googleapis.com). + - Create OAuth 2.0 credentials (Web Application) with proper redirect URIs. + - Configure a [Social Connection for Google in Auth0](https://marketplace.auth0.com/integrations/google-social-connection) + - Make sure to enable `Token Vault` + - Select `Offline Access` scope + + + + + + diff --git a/auth4genai/calling-apis/cloudflare/how-tos/list-github-repositories.mdx b/auth4genai/calling-apis/cloudflare/how-tos/list-github-repositories.mdx new file mode 100644 index 000000000..f66d814d0 --- /dev/null +++ b/auth4genai/calling-apis/cloudflare/how-tos/list-github-repositories.mdx @@ -0,0 +1,29 @@ +--- +title: List GitHub Repositories +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to list your GitHub repositores" +mode: "wide" +--- + +import CloudflareAgents from "/snippets/how-tos/github/cloudflare-agents.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Create and configure a [GitHub App](https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/about-creating-github-apps). + - Configure a [Social Connection for GitHub in Auth0](https://marketplace.auth0.com/integrations/github-social-connection) + - Make sure to enable `Token Vault` + + + + + + diff --git a/auth4genai/calling-apis/cloudflare/how-tos/list-slack-channels.mdx b/auth4genai/calling-apis/cloudflare/how-tos/list-slack-channels.mdx new file mode 100644 index 000000000..d528b8b66 --- /dev/null +++ b/auth4genai/calling-apis/cloudflare/how-tos/list-slack-channels.mdx @@ -0,0 +1,28 @@ +--- +title: List Slack Channels +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to list your Slack channels" +mode: "wide" +--- + +import CloudflareAgents from "/snippets/how-tos/slack/cloudflare-agents.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Configure a [Social Connection for Slack in Auth0](https://marketplace.auth0.com/integrations/sign-in-with-slack) + - Make sure to enable `Token Vault` + + + + + + diff --git a/auth4genai/calling-apis/cloudflare/intro/call-others-apis-on-users-behalf.mdx b/auth4genai/calling-apis/cloudflare/intro/call-others-apis-on-users-behalf.mdx new file mode 100644 index 000000000..5ed90b301 --- /dev/null +++ b/auth4genai/calling-apis/cloudflare/intro/call-others-apis-on-users-behalf.mdx @@ -0,0 +1,3 @@ +import Intro from "/snippets/intros/call-others-apis-on-users-behalf.mdx"; + + diff --git a/auth4genai/calling-apis/cloudflare/intro/call-your-apis-on-users-behalf.mdx b/auth4genai/calling-apis/cloudflare/intro/call-your-apis-on-users-behalf.mdx new file mode 100644 index 000000000..0e64487eb --- /dev/null +++ b/auth4genai/calling-apis/cloudflare/intro/call-your-apis-on-users-behalf.mdx @@ -0,0 +1,3 @@ +import Intro from "/snippets/intros/call-your-apis-on-users-behalf.mdx"; + + diff --git a/auth4genai/calling-apis/genkit/how-tos/check-google-calendar-availability.mdx b/auth4genai/calling-apis/genkit/how-tos/check-google-calendar-availability.mdx new file mode 100644 index 000000000..f7c58ed89 --- /dev/null +++ b/auth4genai/calling-apis/genkit/how-tos/check-google-calendar-availability.mdx @@ -0,0 +1,32 @@ +--- +title: Check Google Calendar Availability +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to check your Google Calendar availability." +mode: "wide" +--- + +import GenKitSample from "/snippets/how-tos/google-calendar/genkit.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Set up and configure a Google Cloud project: + - Enable the [Google Calendar API](https://console.cloud.google.com/apis/library/calendar-json.googleapis.com). + - Create OAuth 2.0 credentials (Web Application) with proper redirect URIs. + - Configure a [Social Connection for Google in Auth0](https://marketplace.auth0.com/integrations/google-social-connection) + - Make sure to enable `Token Vault` + - Select `Offline Access` scope + + + + + + diff --git a/auth4genai/calling-apis/genkit/how-tos/list-github-repositories.mdx b/auth4genai/calling-apis/genkit/how-tos/list-github-repositories.mdx new file mode 100644 index 000000000..63baeaae9 --- /dev/null +++ b/auth4genai/calling-apis/genkit/how-tos/list-github-repositories.mdx @@ -0,0 +1,29 @@ +--- +title: List GitHub Repositories +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to list your GitHub repositores" +mode: "wide" +--- + +import GenKitSample from "/snippets/how-tos/github/genkit.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Create and configure a [GitHub App](https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/about-creating-github-apps). + - Configure a [Social Connection for GitHub in Auth0](https://marketplace.auth0.com/integrations/github-social-connection) + - Make sure to enable `Token Vault` + + + + + + diff --git a/auth4genai/calling-apis/genkit/how-tos/list-slack-channels.mdx b/auth4genai/calling-apis/genkit/how-tos/list-slack-channels.mdx new file mode 100644 index 000000000..2b0fe4531 --- /dev/null +++ b/auth4genai/calling-apis/genkit/how-tos/list-slack-channels.mdx @@ -0,0 +1,28 @@ +--- +title: List Slack Channels +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to list your Slack channels" +mode: "wide" +--- + +import GenKitSample from "/snippets/how-tos/slack/genkit.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Configure a [Social Connection for Slack in Auth0](https://marketplace.auth0.com/integrations/sign-in-with-slack) + - Make sure to enable `Token Vault` + + + + + + diff --git a/auth4genai/calling-apis/genkit/intro/call-others-apis-on-users-behalf.mdx b/auth4genai/calling-apis/genkit/intro/call-others-apis-on-users-behalf.mdx new file mode 100644 index 000000000..5ed90b301 --- /dev/null +++ b/auth4genai/calling-apis/genkit/intro/call-others-apis-on-users-behalf.mdx @@ -0,0 +1,3 @@ +import Intro from "/snippets/intros/call-others-apis-on-users-behalf.mdx"; + + diff --git a/auth4genai/calling-apis/genkit/intro/call-your-apis-on-users-behalf.mdx b/auth4genai/calling-apis/genkit/intro/call-your-apis-on-users-behalf.mdx new file mode 100644 index 000000000..0e64487eb --- /dev/null +++ b/auth4genai/calling-apis/genkit/intro/call-your-apis-on-users-behalf.mdx @@ -0,0 +1,3 @@ +import Intro from "/snippets/intros/call-your-apis-on-users-behalf.mdx"; + + diff --git a/auth4genai/calling-apis/langgraph/get-started/call-others-apis-on-users-behalf.mdx b/auth4genai/calling-apis/langgraph/get-started/call-others-apis-on-users-behalf.mdx new file mode 100644 index 000000000..48d7f5c98 --- /dev/null +++ b/auth4genai/calling-apis/langgraph/get-started/call-others-apis-on-users-behalf.mdx @@ -0,0 +1,40 @@ +--- +title: Calling third-party Party APIs +description: Learn how Auth for GenAI enables AI agents to call other's APIs on the user's behalf. +mode: "wide" +--- + +import LangChainNextjsCallOthersApi from "/snippets/get-started/langchain-next-js/call-others-api.mdx"; +import FastApiCallOthersApi from "/snippets/get-started/langchain-fastapi-py/call-others-api.mdx"; + +Use Auth0 SDKs to fetch access tokens for social and enterprise identity providers from Auth0's [Token Vault](https://auth0.com/docs/secure/tokens/token-vault). Using these access tokens, AI agents integrated with the application can call third-party APIs to perform tasks on the user's behalf. + +By the end of this quickstart, you should have an AI application integrated with Auth0 that can: + +1. Retrieve access tokens for a Google social connection. +2. Integrate with an AI agent to call Google APIs. + +## Pick your tech stack + + + + + + + + + + +## Next steps + +You have successfully added the ability to get access tokens for tool calling to your application. For next steps: + +- [Call your APIs on user's behalf docs](/intro/call-your-apis-on-users-behalf). +- Learn more about [Client-initiated account linking](/guides/client-initiated-account-linking). +- Learn more about how Auth0's [Token Vault](https://auth0.com/docs/secure/tokens/token-vault) manages the tokens of supported identity providers. diff --git a/auth4genai/calling-apis/langgraph/get-started/call-your-apis-on-users-behalf.mdx b/auth4genai/calling-apis/langgraph/get-started/call-your-apis-on-users-behalf.mdx new file mode 100644 index 000000000..abc2dc338 --- /dev/null +++ b/auth4genai/calling-apis/langgraph/get-started/call-your-apis-on-users-behalf.mdx @@ -0,0 +1,41 @@ +--- +title: Calling first-party APIs +description: Learn how Auth for GenAI enables AI agents to call first-party APIs on the user's behalf. +mode: "wide" +--- + +import FastApiCallYourApi from "/snippets/get-started/langchain-fastapi-py/call-your-api.mdx"; +import LangChainNextjsCallYourApi from "/snippets/get-started/langchain-next-js/call-your-api.mdx"; + +Let your AI agent call your APIs on behalf of the authenticated user using access tokens securely issued by Auth0. Your API can be any [API that you have configured in Auth0](https://auth0.com/docs/get-started/apis). + +By the end of this quickstart, you should have an AI application integrated with Auth0 that can: + +- Get an Auth0 access token. +- Use the Auth0 access token to make a tool call to your API endpoint, in this case, Auth0's `/userinfo` endpoint. +- Return the data to the user via an AI agent. + +## Pick your tech stack + + + + + + + + + + +## Next steps + +- [Call your APIs on user's behalf docs](/intro/call-your-apis-on-users-behalf). +- To set up third-party tool calling, complete the + [Call other's APIs on user's behalf](../get-started/call-others-apis-on-users-behalf) quickstart. +- To explore the Auth0 Next.js SDK, see the + [Github repo](https://github.com/auth0/nextjs-auth0). diff --git a/auth4genai/calling-apis/langgraph/how-tos/check-google-calendar-availability.mdx b/auth4genai/calling-apis/langgraph/how-tos/check-google-calendar-availability.mdx new file mode 100644 index 000000000..a623347ed --- /dev/null +++ b/auth4genai/calling-apis/langgraph/how-tos/check-google-calendar-availability.mdx @@ -0,0 +1,49 @@ +--- +title: Check Google Calendar Availability +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to check your Google Calendar availability." +mode: "wide" +--- + +import LangGraphJSSample from "/snippets/how-tos/google-calendar/langgraph.mdx"; +import LangGraphSample from "/snippets/how-tos/google-calendar/langgraph-python.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Set up and configure a Google Cloud project: + - Enable the [Google Calendar API](https://console.cloud.google.com/apis/library/calendar-json.googleapis.com). + - Create OAuth 2.0 credentials (Web Application) with proper redirect URIs. + - Configure a [Social Connection for Google in Auth0](https://marketplace.auth0.com/integrations/google-social-connection) + - Make sure to enable `Token Vault` + - Select `Offline Access` scope + + + + + + + Before using this example, make sure you: + + - Install Python 3.11+ and `pip`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Configure a [Social Connection for Google in Auth0](https://marketplace.auth0.com/integrations/google-social-connection) + - Make sure to enable `Token Vault` + - Select `Offline Access` scope + + + + + + diff --git a/auth4genai/calling-apis/langgraph/how-tos/list-github-repositories.mdx b/auth4genai/calling-apis/langgraph/how-tos/list-github-repositories.mdx new file mode 100644 index 000000000..bd258e86a --- /dev/null +++ b/auth4genai/calling-apis/langgraph/how-tos/list-github-repositories.mdx @@ -0,0 +1,45 @@ +--- +title: List GitHub Repositories +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to list your GitHub repositores" +mode: "wide" +--- + +import LangGraphJSSample from "/snippets/how-tos/github/langgraph.mdx"; +import LangGraphSample from "/snippets/how-tos/github/langgraph-python.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Create and configure a [GitHub App](https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/about-creating-github-apps). + - Configure a [Social Connection for GitHub in Auth0](https://marketplace.auth0.com/integrations/github-social-connection) + - Make sure to enable `Token Vault` + + + + + + + Before using this example, make sure you: + + - Install Python 3.11+ and `pip`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Configure a [Social Connection for GitHub in Auth0](https://marketplace.auth0.com/integrations/github-social-connection) + - Make sure to enable `Token Vault` + + + + + + diff --git a/auth4genai/calling-apis/langgraph/how-tos/list-slack-channels.mdx b/auth4genai/calling-apis/langgraph/how-tos/list-slack-channels.mdx new file mode 100644 index 000000000..2908d4b36 --- /dev/null +++ b/auth4genai/calling-apis/langgraph/how-tos/list-slack-channels.mdx @@ -0,0 +1,44 @@ +--- +title: List Slack Channels +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to list your Slack channels" +mode: "wide" +--- + +import LangGraphJSSample from "/snippets/how-tos/slack/langgraph.mdx"; +import LangGraphSample from "/snippets/how-tos/slack/langgraph-python.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Configure a [Social Connection for Slack in Auth0](https://marketplace.auth0.com/integrations/sign-in-with-slack) + - Make sure to enable `Token Vault` + + + + + + + Before using this example, make sure you: + + - Install Python 3.11+ and `pip`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Configure a [Social Connection for Slack in Auth0](https://marketplace.auth0.com/integrations/sign-in-with-slack) + - Make sure to enable `Token Vault` + + + + + + diff --git a/auth4genai/calling-apis/langgraph/intro/call-others-apis-on-users-behalf.mdx b/auth4genai/calling-apis/langgraph/intro/call-others-apis-on-users-behalf.mdx new file mode 100644 index 000000000..5ed90b301 --- /dev/null +++ b/auth4genai/calling-apis/langgraph/intro/call-others-apis-on-users-behalf.mdx @@ -0,0 +1,3 @@ +import Intro from "/snippets/intros/call-others-apis-on-users-behalf.mdx"; + + diff --git a/auth4genai/calling-apis/langgraph/intro/call-your-apis-on-users-behalf.mdx b/auth4genai/calling-apis/langgraph/intro/call-your-apis-on-users-behalf.mdx new file mode 100644 index 000000000..0e64487eb --- /dev/null +++ b/auth4genai/calling-apis/langgraph/intro/call-your-apis-on-users-behalf.mdx @@ -0,0 +1,3 @@ +import Intro from "/snippets/intros/call-your-apis-on-users-behalf.mdx"; + + diff --git a/auth4genai/calling-apis/llamaindex/how-tos/check-google-calendar-availability.mdx b/auth4genai/calling-apis/llamaindex/how-tos/check-google-calendar-availability.mdx new file mode 100644 index 000000000..ec258584d --- /dev/null +++ b/auth4genai/calling-apis/llamaindex/how-tos/check-google-calendar-availability.mdx @@ -0,0 +1,48 @@ +--- +title: Check Google Calendar Availability +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to check your Google Calendar availability." +mode: "wide" +--- + +import LlamaIndexJSSample from "/snippets/how-tos/google-calendar/llamaindex.mdx"; +import LlamaIndexSample from "/snippets/how-tos/google-calendar/llamaindex-python.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Set up and configure a Google Cloud project: + - Enable the [Google Calendar API](https://console.cloud.google.com/apis/library/calendar-json.googleapis.com). + - Create OAuth 2.0 credentials (Web Application) with proper redirect URIs. + - Configure a [Social Connection for Google in Auth0](https://marketplace.auth0.com/integrations/google-social-connection) + - Make sure to enable `Token Vault` + - Select `Offline Access` scope + + + + + + Before using this example, make sure you: + + - Install Python 3.11+ and `pip`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Configure a [Social Connection for Google in Auth0](https://marketplace.auth0.com/integrations/google-social-connection) + - Make sure to enable `Token Vault` + - Select `Offline Access` scope + + + + + + diff --git a/auth4genai/calling-apis/llamaindex/how-tos/list-github-repositories.mdx b/auth4genai/calling-apis/llamaindex/how-tos/list-github-repositories.mdx new file mode 100644 index 000000000..501c0d118 --- /dev/null +++ b/auth4genai/calling-apis/llamaindex/how-tos/list-github-repositories.mdx @@ -0,0 +1,44 @@ +--- +title: List GitHub Repositories +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to list your GitHub repositores" +mode: "wide" +--- + +import LlamaIndexSample from "/snippets/how-tos/github/llamaindex-python.mdx"; +import LlamaIndexJSSample from "/snippets/how-tos/github/llamaindex.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Create and configure a [GitHub App](https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/about-creating-github-apps). + - Configure a [Social Connection for GitHub in Auth0](https://marketplace.auth0.com/integrations/github-social-connection) + - Make sure to enable `Token Vault` + + + + + + Before using this example, make sure you: + + - Install Python 3.11+ and `pip`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Configure a [Social Connection for GitHub in Auth0](https://marketplace.auth0.com/integrations/github-social-connection) + - Make sure to enable `Token Vault` + + + + + + diff --git a/auth4genai/calling-apis/llamaindex/how-tos/list-slack-channels.mdx b/auth4genai/calling-apis/llamaindex/how-tos/list-slack-channels.mdx new file mode 100644 index 000000000..a036b3888 --- /dev/null +++ b/auth4genai/calling-apis/llamaindex/how-tos/list-slack-channels.mdx @@ -0,0 +1,43 @@ +--- +title: List Slack Channels +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to list your Slack channels" +mode: "wide" +--- + +import LlamaIndexSample from "/snippets/how-tos/slack/llamaindex-python.mdx"; +import LlamaIndexJSSample from "/snippets/how-tos/slack/llamaindex.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Configure a [Social Connection for Slack in Auth0](https://marketplace.auth0.com/integrations/sign-in-with-slack) + - Make sure to enable `Token Vault` + + + + + + Before using this example, make sure you: + + - Install Python 3.11+ and `pip`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Configure a [Social Connection for Slack in Auth0](https://marketplace.auth0.com/integrations/sign-in-with-slack) + - Make sure to enable `Token Vault` + + + + + + diff --git a/auth4genai/calling-apis/llamaindex/intro/call-others-apis-on-users-behalf.mdx b/auth4genai/calling-apis/llamaindex/intro/call-others-apis-on-users-behalf.mdx new file mode 100644 index 000000000..5ed90b301 --- /dev/null +++ b/auth4genai/calling-apis/llamaindex/intro/call-others-apis-on-users-behalf.mdx @@ -0,0 +1,3 @@ +import Intro from "/snippets/intros/call-others-apis-on-users-behalf.mdx"; + + diff --git a/auth4genai/calling-apis/llamaindex/intro/call-your-apis-on-users-behalf.mdx b/auth4genai/calling-apis/llamaindex/intro/call-your-apis-on-users-behalf.mdx new file mode 100644 index 000000000..0e64487eb --- /dev/null +++ b/auth4genai/calling-apis/llamaindex/intro/call-your-apis-on-users-behalf.mdx @@ -0,0 +1,3 @@ +import Intro from "/snippets/intros/call-your-apis-on-users-behalf.mdx"; + + diff --git a/auth4genai/calling-apis/vercel-ai/get-started/call-others-apis-on-users-behalf.mdx b/auth4genai/calling-apis/vercel-ai/get-started/call-others-apis-on-users-behalf.mdx new file mode 100644 index 000000000..433889e49 --- /dev/null +++ b/auth4genai/calling-apis/vercel-ai/get-started/call-others-apis-on-users-behalf.mdx @@ -0,0 +1,40 @@ +--- +title: Calling third-party Party APIs +description: Learn how Auth for GenAI enables AI agents to call other's APIs on the user's behalf. +mode: "wide" +--- + +import VercelCallOthersApi from "/snippets/get-started/vercel-ai-next-js/call-others-api.mdx"; +import ReactSpaVercelCallOthersApi from "/snippets/get-started/vercel-ai-react-spa-js/call-others-api.mdx"; + +Use Auth0 SDKs to fetch access tokens for social and enterprise identity providers from Auth0's [Token Vault](https://auth0.com/docs/secure/tokens/token-vault). Using these access tokens, AI agents integrated with the application can call third-party APIs to perform tasks on the user's behalf. + +By the end of this quickstart, you should have an AI application integrated with Auth0 that can: + +1. Retrieve access tokens for a Google social connection. +2. Integrate with an AI agent to call Google APIs. + +## Pick your tech stack + + + + + + + + + + +## Next steps + +You have successfully added the ability to get access tokens for tool calling to your application. For next steps: + +- [Call your APIs on user's behalf docs](/intro/call-your-apis-on-users-behalf). +- Learn more about [Client-initiated account linking](/guides/client-initiated-account-linking). +- Learn more about how Auth0's [Token Vault](https://auth0.com/docs/secure/tokens/token-vault) manages the tokens of supported identity providers. diff --git a/auth4genai/calling-apis/vercel-ai/get-started/call-your-apis-on-users-behalf.mdx b/auth4genai/calling-apis/vercel-ai/get-started/call-your-apis-on-users-behalf.mdx new file mode 100644 index 000000000..012485006 --- /dev/null +++ b/auth4genai/calling-apis/vercel-ai/get-started/call-your-apis-on-users-behalf.mdx @@ -0,0 +1,34 @@ +--- +title: Calling first-party APIs +description: Learn how Auth for GenAI enables AI agents to call first-party APIs on the user's behalf. +mode: "wide" +--- + +import VercelCallYourApi from "/snippets/get-started/vercel-ai-next-js/call-your-api.mdx"; + +Let your AI agent call your APIs on behalf of the authenticated user using access tokens securely issued by Auth0. Your API can be any [API that you have configured in Auth0](https://auth0.com/docs/get-started/apis). + +By the end of this quickstart, you should have an AI application integrated with Auth0 that can: + +- Get an Auth0 access token. +- Use the Auth0 access token to make a tool call to your API endpoint, in this case, Auth0's `/userinfo` endpoint. +- Return the data to the user via an AI agent. + +## Pick your tech stack + + + + + + + +## Next steps + +- [Call your APIs on user's behalf docs](/intro/call-your-apis-on-users-behalf). +- To set up third-party tool calling, complete the + [Call other's APIs on user's behalf](../get-started/call-others-apis-on-users-behalf) quickstart. +- To explore the Auth0 Next.js SDK, see the + [Github repo](https://github.com/auth0/nextjs-auth0). diff --git a/auth4genai/calling-apis/vercel-ai/how-tos/check-google-calendar-availability.mdx b/auth4genai/calling-apis/vercel-ai/how-tos/check-google-calendar-availability.mdx new file mode 100644 index 000000000..a2853baf1 --- /dev/null +++ b/auth4genai/calling-apis/vercel-ai/how-tos/check-google-calendar-availability.mdx @@ -0,0 +1,32 @@ +--- +title: Check Google Calendar Availability +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to check your Google Calendar availability." +mode: "wide" +--- + +import AISDKSample from "/snippets/how-tos/google-calendar/ai-sdk.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Set up and configure a Google Cloud project: + - Enable the [Google Calendar API](https://console.cloud.google.com/apis/library/calendar-json.googleapis.com). + - Create OAuth 2.0 credentials (Web Application) with proper redirect URIs. + - Configure a [Social Connection for Google in Auth0](https://marketplace.auth0.com/integrations/google-social-connection) + - Make sure to enable `Token Vault` + - Select `Offline Access` scope + + + + + + diff --git a/auth4genai/calling-apis/vercel-ai/how-tos/list-github-repositories.mdx b/auth4genai/calling-apis/vercel-ai/how-tos/list-github-repositories.mdx new file mode 100644 index 000000000..273086e24 --- /dev/null +++ b/auth4genai/calling-apis/vercel-ai/how-tos/list-github-repositories.mdx @@ -0,0 +1,29 @@ +--- +title: List GitHub Repositories +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to list your GitHub repositores" +mode: "wide" +--- + +import AISDKSample from "/snippets/how-tos/github/ai-sdk.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Create and configure a [GitHub App](https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/about-creating-github-apps). + - Configure a [Social Connection for GitHub in Auth0](https://marketplace.auth0.com/integrations/github-social-connection) + - Make sure to enable `Token Vault` + + + + + + diff --git a/auth4genai/calling-apis/vercel-ai/how-tos/list-slack-channels.mdx b/auth4genai/calling-apis/vercel-ai/how-tos/list-slack-channels.mdx new file mode 100644 index 000000000..d05341cec --- /dev/null +++ b/auth4genai/calling-apis/vercel-ai/how-tos/list-slack-channels.mdx @@ -0,0 +1,28 @@ +--- +title: List Slack Channels +description: "Use OpenAI, NextJS, and the Auth0-AI SDKs to list your Slack channels" +mode: "wide" +--- + +import AISDKSample from "/snippets/how-tos/slack/ai-sdk.mdx"; +import { AccountLinking } from "/snippets/how-tos/account-linking.mdx"; + + + + + Before using this example, make sure you: + + - Install Node.js 18+ and `npm`. + - [Set up an OpenAI API key](https://platform.openai.com/docs/quickstart?api-mode=chat). + - Complete the [User authentication quickstart](/get-started/user-authentication) to create a Next.js app integrated with Auth0. + - Configure a [Social Connection for Slack in Auth0](https://marketplace.auth0.com/integrations/sign-in-with-slack) + - Make sure to enable `Token Vault` + + + + + + diff --git a/auth4genai/calling-apis/vercel-ai/intro/call-others-apis-on-users-behalf.mdx b/auth4genai/calling-apis/vercel-ai/intro/call-others-apis-on-users-behalf.mdx new file mode 100644 index 000000000..5ed90b301 --- /dev/null +++ b/auth4genai/calling-apis/vercel-ai/intro/call-others-apis-on-users-behalf.mdx @@ -0,0 +1,3 @@ +import Intro from "/snippets/intros/call-others-apis-on-users-behalf.mdx"; + + diff --git a/auth4genai/calling-apis/vercel-ai/intro/call-your-apis-on-users-behalf.mdx b/auth4genai/calling-apis/vercel-ai/intro/call-your-apis-on-users-behalf.mdx new file mode 100644 index 000000000..0e64487eb --- /dev/null +++ b/auth4genai/calling-apis/vercel-ai/intro/call-your-apis-on-users-behalf.mdx @@ -0,0 +1,3 @@ +import Intro from "/snippets/intros/call-your-apis-on-users-behalf.mdx"; + + diff --git a/auth4genai/docs.json b/auth4genai/docs.json index b5fae17fd..cc8361d1a 100644 --- a/auth4genai/docs.json +++ b/auth4genai/docs.json @@ -39,145 +39,418 @@ "navigation": { "tabs": [ { - "tab": "Docs", - "groups": [ + "tab": "Overview", + "menu": [ { - "group": "Auth for GenAI", - "icon": "book-open", - "pages": [ - "intro/overview", + "item": "Auth for GenAI", + "groups": [ + { + "group": "Auth for GenAI", + "pages": [ + "intro/overview", + "get-started/overview", + "sample-apps" + ] + }, { - "group": "User Authentication", + "group": "SDKs", "pages": [ - "intro/user-authentication", - "intro/call-your-apis-on-users-behalf" + "sdks/overview", + "sdks/javascript-sdk", + "sdks/python-sdk", + "sdks/langchain-sdk", + "sdks/llamaindex-sdk", + "sdks/vercel-ai-sdk", + "sdks/cloudflare-sdk", + "sdks/genkit-sdk" ] }, { - "group": "Call Other's APIs with Token Vault", + "group": "Integrations", "pages": [ + "integrations/overview", + { + "group": "Social Integrations", + "pages": [ + "integrations/box", + "integrations/discord", + "integrations/figma", + "integrations/freshbooks", + "integrations/github", + "integrations/google", + "integrations/microsoft", + "integrations/oauth2", + "integrations/slack", + "integrations/snapchat", + "integrations/spotify", + "integrations/stripe-connect", + "integrations/tumblr" + ] + }, + { + "group": "Enterprise Integrations", + "pages": ["integrations/oidc"] + } + ] + }, + { + "group": "Concepts", + "pages": [ + "glossary", "intro/token-vault", "intro/integrations", - "intro/account-linking", - "intro/call-others-apis-on-users-behalf" + "intro/account-linking" ] - }, - "intro/asynchronous-authorization", - "intro/authorization-for-rag" + } ] }, { - "group": "Get Started", - "icon": "rocket-launch", - "pages": [ - "get-started/overview", - "get-started/user-authentication", - "get-started/call-your-apis-on-users-behalf", - "get-started/call-others-apis-on-users-behalf", - "get-started/asynchronous-authorization", - "get-started/authorization-for-rag" + "item": "Integrations", + "groups": [ + { + "group": " ", + "pages": [ + "integrations/overview", + { + "group": "Social Integrations", + "pages": [ + "integrations/box", + "integrations/discord", + "integrations/figma", + "integrations/freshbooks", + "integrations/github", + "integrations/google", + "integrations/microsoft", + "integrations/oauth2", + "integrations/slack", + "integrations/snapchat", + "integrations/spotify", + "integrations/stripe-connect", + "integrations/tumblr" + ] + }, + { + "group": "Enterprise Integrations", + "pages": ["integrations/oidc"] + } + ] + } ] }, { - "group": "Build with AI", - "icon": "code", - "pages": [ - "build-with-ai/using-ai-tools" + "item": "Concepts", + "groups": [ + { + "group": "Concepts", + "pages": [ + "glossary", + "intro/token-vault", + "intro/integrations", + "intro/account-linking" + ] + } ] }, { - "group": "Sample Apps", - "icon": "robot", + "item": "Starter Kits", "pages": ["sample-apps"] }, { - "group": "Guides", - "icon": "graduation-cap", + "item": "SDKs", + "groups": [ + { + "group": " ", + "pages": [ + "sdks/overview", + "sdks/javascript-sdk", + "sdks/python-sdk", + "sdks/langchain-sdk", + "sdks/llamaindex-sdk", + "sdks/vercel-ai-sdk", + "sdks/cloudflare-sdk", + "sdks/genkit-sdk" + ] + } + ] + } + ] + }, + { + "tab": "User Authentication", + "groups": [ + { + "group": "Introduction", + "pages": ["intro/user-authentication"] + }, + { + "group": "Get Started", "pages": [ + "get-started/user-authentication", "guides/client-initiated-account-linking" ] }, { - "group": "Glossary", - "icon": "compass", - "pages": ["glossary"] + "group": " ", + "pages": ["build-with-ai/using-ai-tools"] } ] }, - { - "tab": "Integrations", - "groups": [ + { + "tab": "Calling APIs", + "dropdowns": [ { - "group": " ", - "pages": [ - "integrations/overview", + "dropdown": "LangGraph", + "icon": "https://mintlify-assets.b-cdn.net/auth0/langchain.svg", + "groups": [ + { + "group": "Introduction", + "pages": [ + "calling-apis/langgraph/intro/call-your-apis-on-users-behalf", + "calling-apis/langgraph/intro/call-others-apis-on-users-behalf" + ] + }, + { + "group": "Get Started", + "pages": [ + "calling-apis/langgraph/get-started/call-your-apis-on-users-behalf", + "calling-apis/langgraph/get-started/call-others-apis-on-users-behalf" + ] + }, + { + "group": "How-Tos", + "pages": [ + "calling-apis/langgraph/how-tos/check-google-calendar-availability", + "calling-apis/langgraph/how-tos/list-github-repositories", + "calling-apis/langgraph/how-tos/list-slack-channels" + ] + }, + { + "group": " ", + "pages": ["build-with-ai/using-ai-tools"] + } + ] + }, + { + "dropdown": "Vercel AI", + "icon": "https://mintlify-assets.b-cdn.net/auth0/vercel.svg", + "groups": [ + { + "group": "Introduction", + "pages": [ + "calling-apis/vercel-ai/intro/call-your-apis-on-users-behalf", + "calling-apis/vercel-ai/intro/call-others-apis-on-users-behalf" + ] + }, + { + "group": "Get Started", + "pages": [ + "calling-apis/vercel-ai/get-started/call-your-apis-on-users-behalf", + "calling-apis/vercel-ai/get-started/call-others-apis-on-users-behalf" + ] + }, + { + "group": "How-Tos", + "pages": [ + "calling-apis/vercel-ai/how-tos/check-google-calendar-availability", + "calling-apis/vercel-ai/how-tos/list-github-repositories", + "calling-apis/vercel-ai/how-tos/list-slack-channels" + ] + }, + { + "group": " ", + "pages": ["build-with-ai/using-ai-tools"] + } + ] + }, + { + "dropdown": "CloudFlare", + "icon": "https://mintlify-assets.b-cdn.net/auth0/cloudflare.svg", + "groups": [ + { + "group": "Introduction", + "pages": [ + "calling-apis/cloudflare/intro/call-your-apis-on-users-behalf", + "calling-apis/cloudflare/intro/call-others-apis-on-users-behalf" + ] + }, + { + "group": "Get Started", + "pages": [ + "calling-apis/cloudflare/get-started/call-your-apis-on-users-behalf" + ] + }, + { + "group": "How-Tos", + "pages": [ + "calling-apis/cloudflare/how-tos/check-google-calendar-availability", + "calling-apis/cloudflare/how-tos/list-github-repositories", + "calling-apis/cloudflare/how-tos/list-slack-channels" + ] + }, + { + "group": " ", + "pages": ["build-with-ai/using-ai-tools"] + } + ] + }, + { + "dropdown": "GenKit", + "icon": "https://mintlify-assets.b-cdn.net/auth0/genkit.svg", + "groups": [ { - "group": "Social Integrations", + "group": "Introduction", "pages": [ - "integrations/box", - "integrations/discord", - "integrations/figma", - "integrations/freshbooks", - "integrations/github", - "integrations/google", - "integrations/microsoft", - "integrations/oauth2", - "integrations/slack", - "integrations/snapchat", - "integrations/spotify", - "integrations/stripe-connect", - "integrations/tumblr" + "calling-apis/genkit/intro/call-your-apis-on-users-behalf", + "calling-apis/genkit/intro/call-others-apis-on-users-behalf" ] }, { - "group": "Enterprise Integrations", + "group": "How-Tos", "pages": [ - "integrations/oidc" + "calling-apis/genkit/how-tos/check-google-calendar-availability", + "calling-apis/genkit/how-tos/list-github-repositories", + "calling-apis/genkit/how-tos/list-slack-channels" ] + }, + { + "group": " ", + "pages": ["build-with-ai/using-ai-tools"] + } + ] + }, + { + "dropdown": "LlamaIndex", + "icon": "https://mintlify-assets.b-cdn.net/auth0/llamadex.svg", + "groups": [ + { + "group": "Introduction", + "pages": [ + "calling-apis/llamaindex/intro/call-your-apis-on-users-behalf", + "calling-apis/llamaindex/intro/call-others-apis-on-users-behalf" + ] + }, + { + "group": "How-Tos", + "pages": [ + "calling-apis/llamaindex/how-tos/check-google-calendar-availability", + "calling-apis/llamaindex/how-tos/list-github-repositories", + "calling-apis/llamaindex/how-tos/list-slack-channels" + ] + }, + { + "group": " ", + "pages": ["build-with-ai/using-ai-tools"] } ] } ] }, { - "tab": "How-Tos", - "groups": [ + "tab": "Asynchronous Authorization", + "dropdowns": [ + { + "dropdown": "Vercel AI", + "icon": "https://mintlify-assets.b-cdn.net/auth0/vercel.svg", + "groups": [ + { + "group": "Introduction", + "pages": [ + "async-authorization/vercel-ai/intro/asynchronous-authorization", + "async-authorization/vercel-ai/intro/ciba-rar" + ] + }, + { + "group": "Get Started", + "pages": [ + "async-authorization/vercel-ai/get-started/asynchronous-authorization" + ] + }, + { + "group": " ", + "pages": ["build-with-ai/using-ai-tools"] + } + ] + }, { - "group": " ", - "pages": [ - "how-tos/overview", - "how-tos/check-google-calendar-availability", - "how-tos/list-github-repositories", - "how-tos/list-slack-channels", - "how-tos/get-salesforce-opportunities" + "dropdown": "LangGraph", + "icon": "https://mintlify-assets.b-cdn.net/auth0/langchain.svg", + "groups": [ + { + "group": "Introduction", + "pages": [ + "async-authorization/langgraph/intro/asynchronous-authorization", + "async-authorization/langgraph/intro/ciba-rar" + ] + }, + { + "group": "Get Started", + "pages": [ + "async-authorization/langgraph/get-started/asynchronous-authorization" + ] + }, + { + "group": " ", + "pages": ["build-with-ai/using-ai-tools"] + } ] } ] }, { - "tab": "Auth for MCP", - "groups": [ + "tab": "Authorization for RAG", + "dropdowns": [ { - "group": " ", - "pages": ["mcp/auth-for-mcp", "mcp/cloudflare-mcp"] + "dropdown": "LangGraph", + "icon": "https://mintlify-assets.b-cdn.net/auth0/langchain.svg", + "groups": [ + { + "group": "Introduction", + "pages": [ + "authorization-for-rag/langgraph/intro/authorization-for-rag" + ] + }, + { + "group": "Get Started", + "pages": [ + "authorization-for-rag/langgraph/get-started/authorization-for-rag" + ] + }, + { + "group": " ", + "pages": ["build-with-ai/using-ai-tools"] + } + ] + }, + { + "dropdown": "Vercel AI", + "icon": "https://mintlify-assets.b-cdn.net/auth0/vercel.svg", + "groups": [ + { + "group": "Introduction", + "pages": [ + "authorization-for-rag/vercel-ai/intro/authorization-for-rag" + ] + }, + { + "group": "Get Started", + "pages": [ + "authorization-for-rag/vercel-ai/get-started/authorization-for-rag" + ] + }, + { + "group": " ", + "pages": ["build-with-ai/using-ai-tools"] + } + ] } ] }, { - "tab": "SDKs", + "tab": "Auth for MCP", "groups": [ { - "group": " ", - "pages": [ - "sdks/overview", - "sdks/javascript-sdk", - "sdks/python-sdk", - "sdks/langchain-sdk", - "sdks/llamaindex-sdk", - "sdks/vercel-ai-sdk", - "sdks/cloudflare-sdk", - "sdks/genkit-sdk" - ] + "group": "Introduction", + "pages": ["mcp/auth-for-mcp", "mcp/cloudflare-mcp"] } ] } diff --git a/auth4genai/glossary.mdx b/auth4genai/glossary.mdx index 39223ab3f..7abebba86 100644 --- a/auth4genai/glossary.mdx +++ b/auth4genai/glossary.mdx @@ -1,7 +1,7 @@ --- title: Glossary description: "Learn about GenAI and identity management concepts related to Auth for GenAI." -sidebarTitle: Key Terms +mode: wide --- ## What is authentication and authorization? diff --git a/auth4genai/img/arrow-right.svg b/auth4genai/img/arrow-right.svg new file mode 100644 index 000000000..37806d2af --- /dev/null +++ b/auth4genai/img/arrow-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/auth4genai/img/cta-arrow-right.svg b/auth4genai/img/cta-arrow-right.svg new file mode 100644 index 000000000..f2ec629c5 --- /dev/null +++ b/auth4genai/img/cta-arrow-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/auth4genai/img/developer-program-diagram.png b/auth4genai/img/developer-program-diagram.png new file mode 100644 index 000000000..86516158d Binary files /dev/null and b/auth4genai/img/developer-program-diagram.png differ diff --git a/auth4genai/img/github-logo-light.svg b/auth4genai/img/github-logo-light.svg new file mode 100644 index 000000000..d4f34701a --- /dev/null +++ b/auth4genai/img/github-logo-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/auth4genai/img/icon-landing-cloudflare-light.png b/auth4genai/img/icon-landing-cloudflare-light.png new file mode 100644 index 000000000..542066cd6 Binary files /dev/null and b/auth4genai/img/icon-landing-cloudflare-light.png differ diff --git a/auth4genai/img/icon-landing-langchain-light.png b/auth4genai/img/icon-landing-langchain-light.png new file mode 100644 index 000000000..bec49d248 Binary files /dev/null and b/auth4genai/img/icon-landing-langchain-light.png differ diff --git a/auth4genai/img/icon-landing-light.png b/auth4genai/img/icon-landing-light.png new file mode 100644 index 000000000..930c18b98 Binary files /dev/null and b/auth4genai/img/icon-landing-light.png differ diff --git a/auth4genai/img/icon-landing-llamaindex-light.png b/auth4genai/img/icon-landing-llamaindex-light.png new file mode 100644 index 000000000..e1911a6fb Binary files /dev/null and b/auth4genai/img/icon-landing-llamaindex-light.png differ diff --git a/auth4genai/img/icon-landing-mcp-light.png b/auth4genai/img/icon-landing-mcp-light.png new file mode 100644 index 000000000..9ef2775c9 Binary files /dev/null and b/auth4genai/img/icon-landing-mcp-light.png differ diff --git a/auth4genai/img/icon-landing-user-light.png b/auth4genai/img/icon-landing-user-light.png new file mode 100644 index 000000000..1193d5ec7 Binary files /dev/null and b/auth4genai/img/icon-landing-user-light.png differ diff --git a/auth4genai/img/icon-landing-vercel-light.png b/auth4genai/img/icon-landing-vercel-light.png new file mode 100644 index 000000000..bbe1e7172 Binary files /dev/null and b/auth4genai/img/icon-landing-vercel-light.png differ diff --git a/auth4genai/img/icon-multishape-light.png b/auth4genai/img/icon-multishape-light.png new file mode 100644 index 000000000..204abdd19 Binary files /dev/null and b/auth4genai/img/icon-multishape-light.png differ diff --git a/auth4genai/img/icon-store_4-light.png b/auth4genai/img/icon-store_4-light.png new file mode 100644 index 000000000..1b53ad4ba Binary files /dev/null and b/auth4genai/img/icon-store_4-light.png differ diff --git a/auth4genai/index.mdx b/auth4genai/index.mdx new file mode 100644 index 000000000..d5a958e85 --- /dev/null +++ b/auth4genai/index.mdx @@ -0,0 +1,16 @@ +--- +mode: "custom" +sidebarTitle: Auth for GenAI +--- + +import {GenAIBanner, UseCasesGrid, AvailableSDKs, GetStartedCTA, StarterKits, DeveloperProgram} from "/snippets/home/index.jsx"; + + +
+ + +
+ +
+ +
diff --git a/auth4genai/integrations/overview.mdx b/auth4genai/integrations/overview.mdx index 66de1ac23..e2fe34d1d 100644 --- a/auth4genai/integrations/overview.mdx +++ b/auth4genai/integrations/overview.mdx @@ -1,5 +1,5 @@ --- -title: Integrations +title: Gallery description: "The following integrations are available for use with your AI Agents through Auth0." mode: "wide" --- @@ -13,7 +13,7 @@ Allow your AI Agents to interact with these applications by setting up an Auth0 -**Can't find what you're looking for?** +**Can't find what you're looking for?** You can build a custom integration for any OAuth2-compliant service using our [Custom OAuth2 Connection](/integrations/oauth2) guide, or contact our team to request a new integration. @@ -29,4 +29,4 @@ Ready to start using integrations in your application? icon="key" horizontal /> - \ No newline at end of file + diff --git a/auth4genai/sample-apps.mdx b/auth4genai/sample-apps.mdx index 428f97831..11ebb5ff5 100644 --- a/auth4genai/sample-apps.mdx +++ b/auth4genai/sample-apps.mdx @@ -1,8 +1,7 @@ --- -title: Sample Apps +title: Starter Kits description: Explore sample apps built using Auth for GenAI. -sidebarTitle: AI Agent Sample Apps -mode: "wide" +mode: wide --- diff --git a/auth4genai/sdks/overview.mdx b/auth4genai/sdks/overview.mdx index 0af38526b..41f3b4076 100644 --- a/auth4genai/sdks/overview.mdx +++ b/auth4genai/sdks/overview.mdx @@ -1,7 +1,7 @@ --- title: Auth for GenAI SDKs description: "Start building GenAI applications with Auth0 SDKs." -sidebarTitle: SDKs +sidebarTitle: Overview mode: "wide" --- diff --git a/auth4genai/snippets/home/index.jsx b/auth4genai/snippets/home/index.jsx new file mode 100644 index 000000000..269413ba9 --- /dev/null +++ b/auth4genai/snippets/home/index.jsx @@ -0,0 +1,308 @@ +export const GenAIBanner = () => { + return ( +
+
+

Auth for AI Agents

+

+ Secure your AI Agents and GenAI applications +

+
+
+ ); +}; + +export const UseCasesGrid = () => { + const useCases = [ + { + title: "User Authentication", + description: "Strong user authentication is crucial for personalizing AI Agent interactions. It enhances security, and manages access to AI models and features.", + icon: "/img/icon-landing-user-light.png", + href: "/intro/user-authentication" + }, + { + title: "Calling APIs", + description: "A secure way to enable API calls with credential management using a token vault, for both backend services and SPAs (Single-page Applications).", + icon: "/img/icon-multishape-light.png", + href: "/intro/call-others-apis-on-users-behalf" + }, + { + title: "Asynchronous Authorization", + description: "A secure \"human-in-the-loop\" mechanism, allowing agents to act asynchronously in the background and seek user consent.", + icon: "/img/icon-landing-light.png", + href: "/intro/asynchronous-authorization" + }, + { + title: "Authorization for RAG", + description: "Ensures that a GenAI application only accesses data that a user is allowed to see. This safeguards sensitive information and prevents unauthorized exposure.", + icon: "/img/icon-store_4-light.png", + href: "/intro/authorization-for-rag" + }, + { + title: "Auth for MCP", + description: "Auth0 strong user authentication is crucial for personalizing AI Agent interactions. It enhances security, and manages access to AI models and features.", + icon: "/img/icon-landing-mcp-light.png", + href: "/mcp/auth-for-mcp" + } + ]; + + return ( +
+

+ Use Cases +

+ + +
+ ); +}; + +export const AvailableSDKs = () => { + const sdks = [ + { + name: "LangChain", + logo: "/img/icon-landing-langchain-light.png", + href: "/sdks/langchain-sdk", + padding: "5.71px" + }, + { + name: "LlamaIndex", + logo: "/img/icon-landing-llamaindex-light.png", + href: "/sdks/llamaindex-sdk", + padding: "5px 6px 6px 5px" + }, + { + name: "Vercel AI", + logo: "/img/icon-landing-vercel-light.png", + href: "/sdks/vercel-ai-sdk", + padding: "10px 8.45px" + }, + { + name: "Cloudflare Agents", + logo: "/img/icon-landing-cloudflare-light.png", + href: "/sdks/cloudflare-sdk", + padding: "6.429px 5.714px" + } + ]; + + return ( +
+

+ Available SDKs +

+ +
+ {sdks.map((sdk, idx) => ( + +
+ {sdk.name} +
+ {sdk.name} +
+ ))} +
+ + +
+ ); +}; + +export const GetStartedCTA = () => { + return ( +
+
+
+

+ Get started quickly with Auth for AI Agents +

+

+ Use it for explanations, workflows, or direct integration into your app. +

+
+ +
+
+ ); +}; + +export const StarterKits = () => { + const kits = [ + { + title: "Assistant0", + description: "An assistant with secure auth, API access, approvals, and FGA-protected RAG.", + githubUrl: "https://github.com/auth0-samples/auth0-assistant0" + }, + { + title: "SmartHR Assistant", + description: "An AI-driven assistant provides secure access to HR documents based on complex authorization rules.", + githubUrl: "https://github.com/auth0-samples/auth0-ai-smart-hr-assistant" + }, + { + title: "Agent0", + description: "Reference AI personal assistant with pre-configured auth that demonstrates different auth for GenAI features.", + githubUrl: "https://github.com/auth0-samples/agent0" + } + ]; + + return ( +
+

+ Starter Kits +

+ + + + +
+ ); +}; + +export const DeveloperProgram = () => { + return ( +
+
+
+
+
+

+ Developer Program +

+

+ Join today to start building secure GenAI applications and provide feedback to shape the platform's future. +

+
+ + Join Dev Program + arrow + +
+
+
+ Developer Program +
+
+
+
+
+ ); +}; diff --git a/auth4genai/snippets/how-tos/account-linking.mdx b/auth4genai/snippets/how-tos/account-linking.mdx index 5484fe489..b21d1a5b7 100644 --- a/auth4genai/snippets/how-tos/account-linking.mdx +++ b/auth4genai/snippets/how-tos/account-linking.mdx @@ -1,5 +1,41 @@ -## Account Linking - -If you're integrating with {props.connectionLabel || "any Identity Provider"}, but users in your app or agent can sign in using other methods (e.g., a username and password or another social provider), you'll need to link these identities into a single user account. Auth0 refers to this process as [Account Linking](https://auth0.com/docs/manage-users/user-accounts/user-account-linking). - -**Account Linking** logic and handling will vary depending on your app or agent. You can find an example of how to implement it in a Next.js chatbot app [here](https://github.com/auth0-lab/market0/blob/main/app/api/auth/%5Bauth0%5D/route.ts#L43). If you have questions or are looking for best practices, [join our Discord](http://discord.gg/XbQpZSF2Ys) and ask in the `#auth0-for-gen-ai` channel. +export const AccountLinking = ({ connectionLabel }) => { + return ( + <> +

Account Linking

+

+ If you're integrating with {connectionLabel}, but users in your app or + agent can sign in using other methods (e.g., a username and password or + another social provider), you'll need to link these identities into a + single user account. Auth0 refers to this process as{" "} + + Account Linking + . +

+

+ Account Linking logic and handling will vary depending + on your app or agent. You can find an example of how to implement it in + a Next.js chatbot app{" "} + + here + + . If you have questions or are looking for best practices,{" "} + + join our Discord + {" "} + and ask in the #auth0-for-gen-ai channel. +

+ + ); +}; diff --git a/auth4genai/snippets/intros/asynchronous-authorization.mdx b/auth4genai/snippets/intros/asynchronous-authorization.mdx new file mode 100644 index 000000000..e8244239b --- /dev/null +++ b/auth4genai/snippets/intros/asynchronous-authorization.mdx @@ -0,0 +1,102 @@ +This process relies on a decoupled authentication flow where the user provides consent on a trusted device, such as their mobile phone, separate from the device where the agent was initially engaged. + + +