> Markdown version of https://authpi.com/docs/reference/idp-api/openid-connect/ — fetch the complete AuthPI docs index at https://authpi.com/llms.txt to discover all available pages.

# OpenID Connect — AuthPI Identity Provider API

## GET /{issuer_id}/logout

**Logout**

RP-initiated logout using id_token_hint as defined by OIDC

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `issuer_id` | string | Required | Issuer ID |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id_token_hint` | string | Required | ID Token representing the session to terminate |
| `post_logout_redirect_uri` | string | Optional |  |
| `state` | string | Optional |  |

### Responses

| Code | Description | Schema |
| --- | --- | --- |
| 400 | **Bad Request** - The request is malformed or missing required parameters. | `OAuthError` |
| 401 | **Unauthorized** - Authentication is required or has failed. | `OAuthError` |
| 403 | **Forbidden** - The authenticated client or user lacks permission for this operation. | `OAuthError` |
| 404 | **Not Found** - The requested resource does not exist. | `OAuthError` |
| 422 | **Unprocessable Entity** - The request syntax is correct but the data cannot be processed. | `OAuthError` |
| 429 | **Too Many Requests** - Rate limit exceeded. | `OAuthError` |
| 500 | **Internal Server Error** - An unexpected error occurred. | `OAuthError` |

## POST /{issuer_id}/logout

**Logout**

RP-initiated logout using id_token_hint as defined by OIDC

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `issuer_id` | string | Required | Issuer ID |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id_token_hint` | string | Required | ID Token representing the session to terminate |
| `post_logout_redirect_uri` | string | Optional |  |
| `state` | string | Optional |  |

### Responses

| Code | Description | Schema |
| --- | --- | --- |
| 400 | **Bad Request** - The request is malformed or missing required parameters. | `OAuthError` |
| 401 | **Unauthorized** - Authentication is required or has failed. | `OAuthError` |
| 403 | **Forbidden** - The authenticated client or user lacks permission for this operation. | `OAuthError` |
| 404 | **Not Found** - The requested resource does not exist. | `OAuthError` |
| 422 | **Unprocessable Entity** - The request syntax is correct but the data cannot be processed. | `OAuthError` |
| 429 | **Too Many Requests** - Rate limit exceeded. | `OAuthError` |
| 500 | **Internal Server Error** - An unexpected error occurred. | `OAuthError` |
