---
title: "Client Initiated Backchannel Authentication (CIBA) Flow"
description: "This article describes the messages in the poll mode as specified by CIBA and aims to help developers understand and implement the specification."
url: "https://curity.io/resources/learn/ciba-flow/"
date: "2025-09-09"
area: "develop"
topic: "openid-connect"
keywords: "client initiated backchannel authentication, ciba, ciba flow, ciba poll mode, ciba messages, ciba metadata, ciba authentication request, ciba authentication response, ciba token request, ciba token response, ciba error response"
---

# Client Initiated Backchannel Authentication (CIBA) Flow

## Overview of the CIBA Flow

The [Client Initiated Backchannel Authentication (CIBA)](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1_0-03.html) defines a protocol to support initiating authentication without user interaction from a consumption device. Authentication is performed via an authentication device by the user who also consents (if required) to the request. CIBA is also referred to as a decoupled authentication flow. You can learn more about these concepts in the article [Client Initiated Backchannel Authentication](https://curity.io/resources/learn/client-initiated-backchannel-authentication/) .

This article describes the messages in the poll mode as specified by CIBA and aims to help developers understand and implement the specification. The flow is a form of asynchronous authentication that uses secure backchannel communication between the client and the authorization server.

![Client Initiated Backchannel Authentication](https://curity.io/images/resources/standards/openid-connect/ciba/ciba-poll-mode.svg) 

1.  The flow starts with an Authentication Request to the Backchannel Authentication Endpoint. The Authorization Server immediately returns an Authentication Request Acknowledgement with a transaction identifier, the `auth_req_id`.
2.  The user authenticates through an out-of-band mechanism, a mobile device in this example.
3.  Meanwhile, the client polls the Authorization Server regularly, checking for a token. The Authorization Server returns a Token Response with either an error indicating that the authentication is pending, or the tokens if available.

## Metadata

**Client Metadata**

At registration, the client specifies that it will use the Poll mode for token delivery. The client must support the grant type `urn:openid:params:grant-type:ciba`.

| Parameter | Mandatory | Description |
| --- | --- | --- |
| `grant_types` | yes | A list of grant types to be used against the token endpoint. Must include `urn:openid:params:grant-type:ciba` for CIBA. |
| `token_delivery_mode` | yes | The mode to use for token delivery. In this case, it's `poll`. |
| `backchannel_user_code_parameter` | no | Specifies if the client supports the `user_code` parameter. The default value is false. Only relevant if the authorization server supports user codes. |
| `token_endpoint_auth_method` | yes | Public clients are not supported by CIBA. The client must authenticate with any of the client authentication methods supported by the authorization server. |

If utilizing [Pairwise Pseudonymous Identifiers (PPID)](https://curity.io/resources/learn/ppid-intro/), the following parameters are of importance.

| Parameter | Mandatory | Description |
| --- | --- | --- |
| `subject_type` | yes | `pairwise` indicates that PPIDs are used in tokens |
| `jwks_uri` | yes\* | A URL to the client's public keys in the format of JSON Web Key Set. Either `jwks_uri` or `sector_identifier_uri` must be specified. |
| `sector_identifier_uri` | yes\* | A URL pointing to a file with a single JSON array of `redirect_uri` or `jwks_uri` values. If specified, the `jwks_uri` must be included in the list of URIs. |

**Authorization Server Metadata**

When implementing a CIBA flow, the client must be aware of the following metadata from the Authorization Server.

| Parameter | Mandatory | Description |
| --- | --- | --- |
| `grant_types_supported` | yes | The list of supported grant types. It must include `urn:openid:params:grant-type:ciba`. |
| `backchannel_token_delivery_modes_supported` | yes | An array of the supported token delivery modes: `poll`, `ping` or `push` |
| `backchannel_authentication_endpoint` | yes | A URL of the OPs Backchannel Authentication Endpoint to where the client sends the authentication request to initiate a CIBA flow. |
| `backchannel_user_code_parameter_supported` | no | If the Authorization Server does support user codes. Default is `false`. |
| `token_endpoint_auth_methods_supported` | no | An array of the supported client authentication methods. Default is `client_secret_basic`. |

## Authentication Request

To initiate the Backchannel Authentication, the client sends an authentication request to the authorization server's Backchannel Authentication Endpoint using HTTP POST with Content-Type header set to `application/x-www-form-urlencoded`. The client needs to authenticate to the authorization server as part of the authentication request. Any client authentication method defined by OpenID or extensions may be used.

| Parameter Name | Mandatory | Description |
| --- | --- | --- |
| `scope` | yes | CIBA extends OpenID Connect. The list of scopes in the authentication request must therefore contain `openid`. |
| `login_hint_token` `id_token_hint` or `login_hint` | yes | A proprietary token, a previously issued ID token, or some other string that allows the authorization server to identify the user (who it requests to login). One of these parameters must be provided. |
| `acr_values` | no | A space-separated list of preferred authentication context class references. The resulting ID token will contain an `acr` claim with the Authentication Context Class that the authentication satisfied. The `acr` claim value can specify the level of assurance of the user's identity or authentication method. |
| `binding_message` | no | A 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. |
| `user_code` | no | If supported by the client and authorization server, the client may request a secret code from the user. This code will be used to authorize initiating an authentication at the user's authentication device. |
| `requested_expiry` | no | Authentication requests have a lifetime, meaning they can time out if the user does not authenticate in a timely fashion. The client can influence the lifetime of the authentication request with this parameter. |

In the example below, the client uses mutual TLS, a client authentication method recommended by CIBA. When using mutual TLS for client authentication, the client must include its `client_id` in the requests. The line breaks were added for display purposes.

```shell
POST /oauth/v2/oauth-authorize HTTP/1.1
Host: idsvr.example.com
Content-Type: application/x-www-form-urlencoded

client_id=consumer_device&
scope=openid%20email%20phone&
binding_message=2X56&
requested_expiry=90&
acr_values=urn%3Ase%3Acurity%3Aauthentication%3Abankid&
login_hint_token=eyJhbGciOiJFUzI1N...AcwJlONxhb2Q
```

## Authentication Response

The authorization server authenticates the client and verifies the authentication request. It checks, for example, if the hint is valid and identifies a known user. In case of an error, an authentication error response is returned. Otherwise, the authorization server responds with a successful authentication request acknowledgment.

### Successful Authentication Request Acknowledgement

The authentication request acknowledgment includes parameters that are of importance for upcoming requests.

| Parameter Name | Mandatory | Description |
| --- | --- | --- |
| `auth_req_id` | yes | This is the unique ID of the authentication request. It is used in the token requests to identify the transaction started by the client's authentication request. Thus, the client must keep this parameter. |
| `expires_in` | yes | The number of seconds since the authentication request was received, and for how long the authentication request will be valid. |
| `interval` | no | The number of seconds that the client must wait between two polling requests. The default value is 5. |

Study the following non-normative example of an authentication request acknowledgment:

```shell
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
  "auth_req_id": "bspuw6ea-scst-u5hn-p3nt-37khzwY4g",
  "expires_in": 900,
  "interval": 5
}
```

### Authentication Error Response

If the authentication request raises an error, the Authorization Server will return an authentication error response using HTTP status codes and descriptive error codes in the body of the response. Just as with token error responses, the body is formatted as `application/json`.

The following parameters appear in an error response:

| Parameter Name | Mandatory | Description |
| --- | --- | --- |
| `error` | yes | A predefined error code. |
| `error_description` | no | Additional information about the error in a human-readable form to help developers diagnose the error. |
| `error_uri` | no | A link to a human-readable web page with additional information about the error similar to `error_description`. |

The non-normative example below demonstrates an authentication error response as a result of the example authentication request listed above:

```shell
HTTP/1.1 400 Bad Request
Content-Type: application/json

{
  "error": "unknown_user_id",
  "error_description": "Cannot identify the subject from the login_hint_token."
}
```

The authorization server may return one of the following errors. Please note that this list is not complete by any means. Refer to the specification for [a complete list of error codes](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1_0-03.html#rfc.section.13).

| HTTP 400 Bad Request |  |
| --- | --- |
| `invalid_request` | The request is malformed. This code may be returned if there is an error with the parameters, such as missing required parameters or duplicates. |
| `invalid_scope` | The requested scope is invalid, unknown, or malformed. |
| `unknown_user_id` | The authorization server cannot determine which user to authenticate based on the hint provided. |
| `invalid_binding_message` | The binding message is not accepted by the authorization server because it is considered invalid in the context of the given authentication request. |
| `unauthorized_client` | The client is not authorized to run a CIBA flow. |

| HTTP 401 Unauthorized |  |
| --- | --- |
| `invalid_client` | The client failed to authenticate. This may be, for example, due to invalid credentials or authentication methods. |

## Token Request

In poll mode, after having received the authentication request acknowledgment with `auth_req_id`, the client polls the token endpoint at a reasonable interval. The client must not poll more frequently than the interval specified by the Authorization Server as part of the authentication acknowledgment.

The authorization server may use long polling and not respond before an authentication result is available or a timeout has occurred. Therefore, the CIBA specification recommends waiting for at least 30 seconds between two polling requests, which is the value recommended by [RFC6202, Best Practices for Long Polling](https://www.rfc-editor.org/rfc/rfc6202#section-5.5). When using long polling, the authorization server may take more time to respond than the specified interval. In this case, the client must not send two overlapping requests with the same `auth_req_id` but wait for a response.

For the token request, the client forms a message using the `application/x-www-form-urlencoded` format and sends it via HTTP POST to the token endpoint. The client must also authenticate as part of the request. The body of the token request contains at least the following parameters:

| Parameter Name | Mandatory | Description |
| --- | --- | --- |
| `grant_type` | yes | The flow to run to retrieve tokens. For CIBA, the value must be `urn:openid:params:grant-type:ciba`. |
| `auth_req_id` | yes | The unique identifier for a transaction initiated by the client. The authorization server uses this identifier to retrieve the status of the authentication and issue tokens if authentication was successful and the user gives consent. |

The token request may look similar to this example. Note that the client uses mutual TLS for client authentication and must provide the `client_id`.

```shell
POST /oauth/v2/oauth-token HTTP/1.1
Host: idsvr.example.com
Content-Type: application/x-www-form-urlencoded

grant_type=urn%3Aopenid%3Aparams%3Agrant-type%3Aciba&
auth_req_id=bspuw6ea-scst-u5hn-p3nt-37khzwY4g&
client_id=consumer_device
```

### Successful Token Response

If the token request is valid, and if the user has been authenticated and has authorized the request, the authorization server will return a successful response just as with any other OpenID Connect flow.

Consider the non-normative example below. Line breaks are added for readability.

```shell
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-cache, no-store

{
  "access_token": "5ca69968-00ca-4535-82e3-c7badf90b51b",
  "refresh_token": "0f8ed1e3-9542-45a0-84ce-4ae3ba61a60e",
  "scope": "openid email phone",
  "id_token": "eyJraWQiOi...kXt31G9Q",
  "token_type": "bearer",
  "expires_in": 300
}
```

### Token Error Response

As with any other flow in OpenID Connect, the token request in CIBA may result in an error. In addition to the error codes defined as part of the OAuth 2.0 specification, CIBA considers the following as applicable as well:

| Error Code | Description |
| --- | --- |
| `authorization_pending` | The user has not yet been authenticated, and the authorization request is still pending. |
| `slow_down` | The authorization request is still pending, and the client must increase the interval for polling requests by at least 5 seconds. |
| `expired_token` | The transaction (`auth_req_id`) has expired. The client must start over with a new authentication request. |
| `access_denied` | The user did not consent to the authorization request. |

```shell
HTTP/1.1 400 Bad Request
Content-Type: application/json
Cache-Control: no-cache, no-store

{
  "error": "authorization_pending"
}
```

The specification extends the meaning of some error codes as follows:

| Error Code | Description |
| --- | --- |
| `invalid_grant` | The provided `auth_req_id` is invalid or was issued to another client. |
| `invalid_request` | The server may return this error if the client does not respect the polling interval. When receiving an `invalid_request`, the client must stop polling for the `auth_req_id`. |

## Resources and Further Information

-   [OpenID Connect Client Initiated Backchannel Authentication Flow](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1_0-03.html)
-   [Error Response in OAuth 2.0](https://www.rfc-editor.org/rfc/rfc6749#section-5.2)
-   [Error Response in OAuth 2.0 Device Authorization Grant](https://www.rfc-editor.org/rfc/rfc8628#section-3.5)
-   [RFC6202 - Best Practices for Long Polling](https://www.rfc-editor.org/rfc/rfc6202#section-5)

## Frequently Asked Questions

How does CIBA differ from the Device Authorization Flow?

While both are decoupled authentication flows, CIBA is more flexible. The Device Authorization Flow requires the user to enter a code on a separate device manually. In contrast, CIBA can push authentication requests directly to a trusted authentication device, offering a smoother user experience.

What are the main use cases for CIBA?

CIBA is commonly used in financial services, telecoms, and healthcare, where regulations like PSD2 require Strong Customer Authentication (SCA). It's particularly useful when the user can't directly interact with the device initiating the transaction, such as confirming a bank payment on a mobile app while shopping online.

What token delivery modes does CIBA support?"

CIBA supports three token delivery modes: Poll: The client polls until the result is available. Ping: The authorization server notifies the client when the result is ready, and the client then fetches the token. Push: The authorization server sends the token response directly to the client's endpoint.

Does CIBA work with all OpenID Connect providers?

Not by default. CIBA is an OpenID Connect extension, so support depends on whether your authorization server implements the CIBA specification. Some providers (like Curity) already support it, while others may require custom implementation.

How does CIBA handle transaction binding?

CIBA uses a binding\_message or user\_code parameter to link the request on the consumption device with the confirmation on the authentication device, ensuring the user knows exactly which transaction they are authorizing.

Is CIBA suitable for mobile-first applications?

Yes. In fact, mobile-first scenarios are where CIBA shines — for example, using a specialized app on your phone as the authentication device to approve a login request from your smart TV, kiosk, or browser session.
