Auth0 SDKs
Updated Auth0 SDKs to secure AI agent workflows:Python Server SDK
The Auth0 Server Python SDK is a library for implementing user authentication in Python applications.Initiating Backchannel Authentication
Initiating Backchannel Authentication
Client-Initiated Backchannel Authentication (CIBA) enables applications to authenticate users via a separate channel or device, without requiring browser-based redirects.
- binding_message: An optional, human-readable message to be displayed at the consumption device and authentication device. This allows the user to ensure the transaction initiated by the consumption device is the same that triggers the action on the authentication device.
- login_hint[‘sub’]: The sub claim of the user that is trying to login using Client-Initiated Backchannel Authentication, and to which a push notification to authorize the login will be sent.
- requested_expiry: The requested lifetime, in seconds, of the authentication request. The default value on Auth0 is 300 seconds.
Using Rich Authorization Requests
Using Rich Authorization Requests
Retrieving an Access Token for a Connections
Retrieving an Access Token for a Connections
The SDK’s
get_access_token_for_connection() can be used to retrieve an Access Token for a connection (e.g. google-oauth2) for the current logged-in user:- connection: The connection for which an access token should be retrieved, e.g. google-oauth2 for Google.
- loginHint: Optional login hint to inform which connection account to use, can be useful when multiple accounts for the connection exist for the same user.
get_access_token_for_connection() will call Auth0 to retrieve a new token and update the cache.In order to do this, the SDK needs access to a Refresh Token. So ensure to always include offline_access if you want to be able to retrieve and refresh an access token for a connection.Python API SDK
The auth0-api-python library allows you to secure APIs running on Python, particularly for verifying Auth0-issued access tokens. It’s intended as a foundation for building more framework-specific integrations (e.g., with FastAPI, Django, etc.), but you can also use it directly in any Python server-side environment.Get an access token for a connection
Get an access token for a connection
If you need to get an access token for an upstream idp via a connection, you can use the
get_access_token_for_connection method:FastAPI SDK
The Auth0 FastAPI SDK is a library for implementing user authentication in FastAPI web applications using Auth0.FastAPI API SDK
The Auth0 FastAPI API SDK library allows you to secure FastAPI APIs using bearer tokens from Auth0. It exposes a simplerequire_auth dependency that checks if incoming requests have a valid JWT, then provides the token claims to your route handler.
Get an access token for a connection
Get an access token for a connection
If you need to get an access token for an upstream idp via a connection, you can use the
get_access_token_for_connection method on the underlying api_client:Auth0 AI SDKs
Auth0 AI SDKs to streamline integrating your application with popular agentic frameworks:Auth0 AI SDK
This SDK provides base abstractions for authentication and authorization in AI applications, including tools for implementing asynchronous user authentication using the Client Initiated Backchannel Authentication (CIBA) protocol. It supports:- A RAG Retriever for using OpenFGA
- Tools for implementing asynchronous user authentication,
- Tools for getting access tokens for third-party connections,
- OpenFGA-based tool authorizers.