Skip to main content
To use Client-Initiated Backchannel Authentication (CIBA) features, you must have an Enterprise Plan or an appropriate add-on. Refer to Auth0 Pricing for details.
Client-Initiated Backchannel Authentication (CIBA) is an specification that allows a client application to initiate an authentication and/or without requiring direct user interaction on the initiating application. Rich Authorization Requests (RAR) is an OAuth 2.0 extension that allows client applications to request for more complex permissions beyond standard OAuth 2.0 scopes in an authorization request. You can use CIBA with RAR to pass data to the in a backchannel request. The authorization_details parameter contains details about the request that you can customize in a consent prompt to show the user. You can authorize users with CIBA using the following notification channels:

Common use cases

Use RAR with the CIBA flow for use cases that require more fine-grained control over resource access. Common use cases include:
  1. A payments app prompts the user to confirm a money transfer. The authorization_details can be customized to show the transaction details.
  2. An AI agent prompts the user with details about a rescheduled doctor’s appointment. The authorization_details can be customized to show the new time and date.

How it works

The User Authorization with CIBA flow is similar to the User Authentication with CIBA flow, where RAR support enables clients to pass the authorization_details to the authorization server via the /bc-authorize endpoint. The following sequence diagram explains the end-to-end User Authorization with CIBA flow:
The following sections dive step-by-step into how user authorization works with CIBA.

Prerequisites

To initiate a CIBA request using Auth0, you must:

Step 1: Client application initiates a CIBA request

Use the User Search APIs to find the authorizing user for whom you’d like to initiate a CIBA request and obtain their user ID. Once you have a user ID for the authorizing user, use the Authentication API to send a CIBA request with the authorization_details to the /bc-authorize endpoint:

Step 2: Auth0 tenant acknowledges the CIBA request

If the Auth0 tenant successfully receives the POST request, you should receive a response containing an auth-req-id that references the request:
The auth_req_id value is passed to the /token endpoint to poll for the completion of the CIBA flow.

Step 3: Client application polls for a response

Use the Authentication API to call the /token endpoint using the urn:openid:params:grant-type:ciba grant type and the auth_req_id you received from the /bc-authorize endpoint:
Until the authorizing user approves the transaction, you should receive the following response:
There is approximately a five-second wait interval for polling. If you poll too frequently, you will receive the following response, where the description varies depending on the backoff interval:
To resolve the error, wait until the next interval (in seconds) to poll the /token endpoint.

Step 4: Authentication device receives the notification

Depending on the notification channel, Auth0 sends a notification to the authentication device: The authentication device retrieves the consent details i.e. the contents of the binding_message from the Auth0 Consent API:
  • Mobile push notification: The Auth0 Guardian app or a custom app integrated with the Auth0 Guardian SDK calls the Auth0 Consent API to retrieve the consent details.
  • Email notification: When the user clicks on the verification link, they are redirected to the browser, which retrieves the consent details from the Auth0 Consent API.
The Auth0 Consent API responds to the authentication device with the consent details, including the binding_message, scope, audience, and authorization_details if configured. The scopes returned to the mobile application are filtered according to your RBAC policy. To learn more, read Role-Based Access Control. The following code sample is an example response from the Auth0 Consent API:
The authentication device presents the consent details with the authorization_details to the user: The user can accept or decline the authorization request at this point.

Step 7: Authentication device sends the user response back to Auth0

After the user accepts or declines the authorization request, the authentication device sends the user response back to Auth0:
  • Mobile push notification: The Auth0 Guardian app or a custom app integrated with the Auth0 Guardian SDK sends the user response back to Auth0.
  • Email notification: The browser sends the user response back to Auth0.

Step 8: Auth0 receives user response after the flow completes

The client application completes the polling upon receiving a response from the /token endpoint. A CIBA flow always requires a response, either an approval or decline, from the authorizing user, and existing grants are not checked. This means Auth0 treats every CIBA request as a fresh authorization for the authorizing user.

Step 9: Auth0 returns access token to client application

If the user rejects the push request, Auth0 returns an error response like the following to the client application:
If the user approves the push request, Auth0 returns an with the authorization_details like the following to the client application:
The refresh_token will only be present if the offline_access scope was included in the initial /bc-authorize request.

Query authorization_details

At compile time, you can query the type and objects of authorization_details from the consent details in a strongly typed manner as you would dynamically query JSON:
If you define a custom type to represent your object, you can use the filterAuthorizationDetailsByType() function to return all authorization_details objects that match the desired type. The following code sample queries authorization_details with the payment type:
filterAuthorizationDetailsByType() only returns objects matching the specified authorization_details type. As a result, your mobile application should present all relevant authorization_details to the user for consent, regardless of their type, to ensure a complete understanding of the request You can also query the authorization_details when the AI agent or application polls the /oauth/tokenendpoint for a response:
When the authorizing user approves the request, Auth0 receives the user response, and the CIBA flow completes, returning an access token and authorization_details array:

Limitations

Auth0 doesn’t support:
  • Modifying RAR in Actions for CIBA flows.
  • Advertising RAR types for clients to discover, which means you need to pre-register clients with the authorization_details types they can send.
  • Validating RAR objects beyond checking that they have a type property that matches allowed types for the API. Your resource server is responsible for the granular validation of the content within authorization_details. For more information, see Configure RAR.

Learn more