Lion Cipher Lab

Log users out everywhere: OIDC RP-Initiated and Back-Channel Logout

Why it matters

Logging a user in is the famous half of identity. Logging them out — cleanly, everywhere, on demand — is the half that shows up in incident response, in 'a shared kiosk still had someone's session', and in every audit that asks 'when an employee is fired, how fast does access actually stop?'. OpenID Connect does not have one logout; it has a family of them, and knowing which channel does what is the difference between thinking a user is signed out and actually ending their access. In this lab you run all of them by hand against a real Keycloak. You will perform RP-Initiated Logout: the app…

What you'll learn

Steps in this lab

  1. The words first: session vs token, and the three logout channels
  2. Start a real authorization server: Keycloak in Docker
  3. Run a tiny local listener to catch redirects and the back-channel POST
  4. Create a realm, a confidential client, and a test user
  5. Read the discovery document — find the real endpoint URLs
  6. Log alice in (authorization code flow) and get an id_token
  7. Confirm the session is ALIVE with a silent (prompt=none) request
  8. RP-Initiated Logout: hit the end_session_endpoint
  9. Front-Channel vs Back-Channel: how OTHER apps get told to log out
  10. Trigger and DECODE a real back-channel logout_token
  11. Admin-driven logout: end one session, or all of a user's sessions
  12. The caveat that catches everyone: the access token still works
  13. Judgment: which logout channel, and when

Open the full interactive lab →