Support OpenID Connect RP-Initiated Logout

Created on 11 July 2025, about 1 month ago

Problem/Motivation

Our goal is to allow a user to logout on the Relying Party (RP), and then automatically log that user out of the OpenID Provider (OP) too, ideally redirecting back to the RP. For reference, see the OpenID Connect RP-Initiated Logout spec.

This spec references additional specs (eg. OpenID Connect Front-Channel Logout and OpenID Connect Back-Channel Logout), which allow the OP to also log the user out of all other RPs. However, we suggest that is out-of-scope for this issue, and should be followed-up in subsequent feature requests.

Steps to reproduce

Current behaviour:

  1. Given I am logged into the RP (via OIDC)
  2. When I log out of the RP
  3. Then I remain on the RP site
  4. When I go to the OP
  5. Then I am still logged in
  6. When I log out of the OP
  7. Then I remain on the OP site

Proposed resolution

Desired behaviour:

  1. Given I am logged into the RP (via OIDC)
  2. When I log out of the RP
  3. Then I am logged out of the OP (optionally with a confirmation step)
  4. And I am redirected to a specified page on the RP site

Remaining tasks

The openid_connect module already supports end_session_endpoint config, and so can redirect to the OP after logout. We can point this to <OP_URL>/user/logout/confirm, and it will already provide the id_token_hint parameter in the URL. Likewise, it also supports redirect_logout config, which sets the post_logout_redirect_uri parameter on the end_session_endpoint URL.

So, a good starting point would probably be to just implement the basics of the spec in relation to how it defines the behaviour around those two parameters. This should result in the "Desired behaviour" outlined above.

User interface changes

TBD

API changes

TBD

Data model changes

N/A

Feature request
Status

Active

Version

6.0

Component

OpenID Connect

Created by

🇨🇦Canada ergonlogic Montréal, Québec 🇨🇦

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024