OIDC end_session_endpoint

Akamai’s Hosted Login solution supports the OpenID Connect (OIDC) end_session_endpoint.

You can view your end_session_endpoint within your discovery document. It looks something like this:
https://v1.api.eu.janrain.com/a12bc34d-567e-8f90-gh12-3i45jk678lm9/login/end_session

This endpoint is useful if you need to perform the following from the frontend of a user-facing application:

  • End the Hosted Login session on the current device/browser (for example, when the user clicks a "Logout" button)
  • End the Hosted Login session across all devices/browsers (for example, when the user clicks a "Log me out everywhere" button)

📘

Need to end the Hosted Login session from the backend? Don't use this end_session_endpoint, which must be called in a browser. Instead, use the administrative /sessions API.

The /end_session endpoint is called in the browser and takes the following URL parameters:

URL parameterStatusValue / Description
post_logout_redirect_uriFunctionally requiredWhere to redirect the user when logout is complete

IMPORTANT! This uri must be listed in the OIDC login client’s postLogoutRedirectURIs configuration
stateFunctionally requiredSame purpose as in the /authorize endpoint;
See state for more information
client_idFunctionally requiredUnique identifier of the OIDC login client;
Validates the post_logout_redirect_uri
logout_hintOptionalTo end the session across all devices, pass in the session ID (the "sid" claim in the id_token);
If this parameter is excluded, the default behavior is to unbind the current device from the session

📘

Note how the /end_session endpoint supports either local or global logout, depending on the inclusion of the logout_hint parameter.

  • A local logout removes the current device from the Hosted Login session (default behavior)
  • A global logout deletes the Hosted Login session (include logout_hint with valid session ID to activate this option)

Example calls

Local logout

https://v1.api.eu.janrain.com/a12bc34d-567e-8f90-gh12-3i45jk678lm9/login/end_session
  ?post_logout_redirect_uri=https%3A%2F%2Fmycompany.com%2Fwelcome
  &state=kittens
  &client_id=4ddd6dc1-8313-4b49-ae2a-1afe65c55a8f 

Global logout

https://v1.api.eu.janrain.com/a12bc34d-567e-8f90-gh12-3i45jk678lm9/login/end_session
  ?post_logout_redirect_uri=https%3A%2F%2Fmycompany.com%2Fwelcome
  &state=kittens
  &client_id=4ddd6dc1-8313-4b49-ae2a-1afe65c55a8f
  &logout_hint=2cfd6334-12ef-4bee-9365-6f918ad1e56b