Auth0 AI for Genkit
This SDK provides building blocks for using Auth0 for AI Agents with Genkit. Includes a RAG Retriever for using OpenFGA, tools for implementing asynchronous user authentication, tools for getting access tokens for third-party connections, and OpenFGA-based tool authorizers. It supports:- A RAG Retriever for using OpenFGA
- OpenFGA-based tool authorizer and re-ranker
- Use a token vault to call third-party APIs on behalf of the user
- Use Client-Initiated Backchannel Authentication (CIBA) for consent flows
- Apply Okta FGA authorization in Retrieval-Augmented Generation (RAG) scenarios
Calling 3rd Party APIs
Calling 3rd Party APIs
Token Vault allows you to exchange refresh tokens for access tokens for third-party APIs. This is useful when you want to use a token vault (like Google, Facebook, etc.) to authenticate users and then use the access token to call the API on behalf of the user.First initialize the Token Vault Authorizer as follows:Then use the
withGoogleAccess to wrap the tool and use getAccessTokenFromTokenVault from the SDK to get the access token.Using Client-Initiated Backchannel Authentication
Using Client-Initiated Backchannel Authentication
CIBA (Client-Initiated Backchannel Authentication) enables secure, user-in-the-loop authentication for sensitive operations. This flow allows you to request user authorization asynchronously and resume execution once authorization is granted.Then wrap the tool as follows:
Using Authorization for RAG
Using Authorization for RAG