RP-Initiated Logout
OpenID Connect RP-Initiated Logout 1.0 (RP-Initiated Logout) lets a relying party (your application) end a user's session at the OpenID Provider. Choreo Identity & Access Management implements it as the end_session_endpoint at GET/POST /oauth2/logout. When your application signs a user out locally, it redirects the browser to this endpoint so Choreo Identity & Access Management also terminates the Single Sign-On session it established, and then returns the user to a page you choose.
Signing out of your application alone leaves the Choreo Identity & Access Management session intact, so the next sign-in reuses it and the user is not prompted. RP-Initiated Logout closes that gap: it ends the session at Choreo Identity & Access Management too, so the next sign-in authenticates the user again.
Ending the session at Choreo Identity & Access Management does not clear what the other applications in that session remember. For that, Choreo Identity & Access Management posts a logout token to every participating application that registered a back-channel logout URI, see Back-Channel Logout.
How It Works
- Your application clears its own session, then redirects the browser to
/oauth2/logout. - Choreo Identity & Access Management validates the request: it resolves the client from the
id_token_hintorclient_id, and checks anypost_logout_redirect_uriagainst the client's registered list. - Choreo Identity & Access Management runs the application's sign-out flow to terminate the SSO session and clear the per-flow session cookie. Depending on how the flow is built, this step may prompt the user to confirm the sign-out first.
- Choreo Identity & Access Management redirects the browser to
post_logout_redirect_uri, appendingstatewhen the application supplied it. If the application supplied no redirect URI, the browser lands on the default Choreo Identity & Access Management sign-out page.
Whether the user is asked to confirm depends on the sign-out flow. Choreo Identity & Access Management flags a request that carries no id_token_hint as needing confirmation, and the sign-out flow decides what to do with that signal. The default sign-out flow ends the session without prompting, which is the path the diagram above shows. The built-in Conditional Confirmation template prompts only when the hint is absent, and Confirm & Sign Out prompts on every request.
How Choreo Identity & Access Management Implements It
| Aspect | Behavior |
|---|---|
| Endpoint | GET/POST /oauth2/logout |
| Discovery | Advertised as end_session_endpoint in /.well-known/openid-configuration, see Server Metadata |
| Session termination | Runs the application's sign-out flow, which ends the SSO session and clears the per-flow cookie, see Sessions and Single Sign-On |
id_token_hint | Optional. When supplied, its signature and issuer are verified; expiry is not enforced, so an expired ID token is accepted. When omitted, the request is flagged as needing confirmation, which a sign-out flow can branch on |
| Redirect validation | post_logout_redirect_uri must match one of the client's registered postLogoutRedirectUris exactly. Wildcard patterns are not available on hosted tenants |
| Sign-out flow | Resolved in order: the flow the application pins, then the default on its organization unit, then the server-level default |
Request Methods
The endpoint accepts the same request as either an HTTP GET or an HTTP POST, carrying the same parameters:
GETcarries the parameters in the query string. This is the usual choice, because signing out is a browser redirect to the endpoint.POSTcarries the parameters in anapplication/x-www-form-urlencodedbody. Use it when theid_token_hintwould make the URL too long, or to keep it out of the URL and browser history. Note that a request body can still be recorded by applications, proxies, or middleware, so treatid_token_hintas sensitive and redact it from logs.
Request Parameters
| Parameter | Required | Description |
|---|---|---|
id_token_hint | Recommended | An ID token that Choreo Identity & Access Management previously issued to this client. It identifies the client whose session is ending. The token may be expired. When omitted, Choreo Identity & Access Management flags the request as needing confirmation, and the sign-out flow decides whether to prompt. |
client_id | Optional | The client that is signing out. Used when id_token_hint is absent, and at least one of the two must be present. When both are present, the client_id must match the client in id_token_hint. |
post_logout_redirect_uri | Optional | Where to send the browser after sign-out. Must exactly match one of the client's registered postLogoutRedirectUris. |
state | Optional | An opaque value Choreo Identity & Access Management appends to post_logout_redirect_uri on the return, when supplied, for your application to correlate the response. |
Validation Rules
Choreo Identity & Access Management rejects the request with 400 Bad Request when:
post_logout_redirect_uridoes not exactly match a URI registered on the client.id_token_hintis present but was not signed by Choreo Identity & Access Management or carries a different issuer.- both
id_token_hintandclient_idare present and identify different clients. - neither
id_token_hintnorclient_idis supplied. - the client id, whether supplied as
client_idor derived fromid_token_hint, does not resolve to a registered client.
Configure Your Application
Sign-Out Flow
Choreo Identity & Access Management terminates the SSO session by running the application's sign-out flow. The flow is resolved in three steps, and the first match wins:
- The sign-out flow pinned on the application under its Flows tab.
- The default sign-out flow set on the application's organization unit, under Organization units → the organization unit → Flows.
- The server-level default sign-out flow.
Choreo Identity & Access Management ships a server-level default, so an application that pins nothing still signs users out. To use a custom flow instead, build one and select it under the application's Flows tab. See Build a Sign-Out Flow.
Register Post-Logout Redirect URIs
For Choreo Identity & Access Management to return the browser to your application, the post_logout_redirect_uri you send must be registered on the application. In the Console, open the application, go to Advanced → OAuth 2 configuration, and add it under Post-logout redirect URIs. In a declarative configuration, the field is postLogoutRedirectUris:
postLogoutRedirectUris:
- https://app.example.com/signed-out
Try It in Choreo Identity & Access Management
Redirect the browser to the endpoint when the user signs out of your application:
GET /oauth2/logout
?id_token_hint=$ID_TOKEN
&post_logout_redirect_uri=https://app.example.com/signed-out
&state=xyz
The same request as a POST sends the parameters in the body instead:
POST /oauth2/logout
Content-Type: application/x-www-form-urlencoded
id_token_hint=$ID_TOKEN&post_logout_redirect_uri=https://app.example.com/signed-out&state=xyz
Choreo Identity & Access Management ends the SSO session and redirects the browser to:
https://app.example.com/signed-out?state=xyz
Related Guides
- Sessions and Single Sign-On, the session model that logout terminates
- Single Sign-On for Flows, how a session is established in the first place
- Build a Sign-Out Flow, the flow that RP-Initiated Logout runs
- OpenID Connect, the identity layer these tokens come from
- Back-Channel Logout, how the other applications in the session are told that it ended
- Server Metadata, the
/.well-known/openid-configurationdocument that advertises the endpoint
Was this page helpful?