Federated logout: verify which sessions and tokens actually end
Understand OIDC RP-initiated logout, distinguish RP, OP, other-app, and token state, and verify the logout behavior your providers actually support.
Federated logout: verify which sessions and tokens actually end
OIDC RP-Initiated Logout lets a relying party (RP) send the browser to the OpenID Provider’s (OP’s) logout endpoint to request sign-out. The OP may notify other RPs, but logout does not guarantee that every session or token ends immediately. App, OP, other-RP, and token state are separate; verify what actually terminated.
Sign-in does not automatically propagate sign-out
After SSO, each RP can keep its own session independently of the identity provider’s cookie. Signing out of app A may end only app A’s session while the OP and app B remain signed in. RP-Initiated Logout begins the request; cross-app notification needs a separately supported and configured mechanism. SAML Single Logout is a separate protocol and should not be assumed to behave like OIDC.
| State | Owner | What to verify |
|---|---|---|
| Current app session | RP | Invalidate server session and expire the browser cookie |
| OP login session | IdP/OP | Check its logout endpoint and confirmation behavior |
| Other app sessions | Each RP | Confirm supported front-channel or back-channel notifications |
| OAuth tokens | OP, client, API | Check refresh-token revocation, access-token acceptance, and timing separately |
Revoking a token is not the same as ending a browser session. Do not assume APIs immediately reject every existing access token after app logout; check token lifetime, revocation support, and resource-server validation.
RP-initiated flow
Read `end_session_endpoint` from trusted OP Discovery metadata.
Decide whether the RP ends its local server session immediately or after the OP response. Local logout should be possible independently of federated request success.
Send the browser to the OP endpoint. An earlier ID Token may be sent as `id_token_hint` to help the OP identify the session.
If returning to the RP, use a pre-registered `post_logout_redirect_uri`; bind and validate returned `state`. Never accept an arbitrary redirect.
Confirm which other RPs receive logout notifications. Without a supported mechanism, their sessions may remain active.
Check access and refresh token behavior separately.
An id_token_hint is an identifier hint, not a universal guarantee of logout. Validate that it was issued by the OP and corresponds to the RP registration/session. Accept only registered callback URLs to avoid open redirects.
Verify behavior in a test environment
Use a test IdP and apps A and B with a test account. Record the logout result, then try protected actions in each app using a fresh request. Revisit the OP, but do not use the presence or absence of a login page alone to infer app session status; SSO may skip the page. Check test access and refresh tokens separately. Also test network failure or canceled OP confirmation and confirm that app A’s local session ends according to policy. These are proposed checks, not reported test results.
Troubleshooting
**Only the current app signs out:** check OP endpoint configuration and whether other RPs registered notification support.
**Session ends only after closing the browser:** confirm server-side session invalidation as well as cookie removal; front-channel behavior may depend on browser policies.
**API calls still work:** inspect token lifetime, validation, and revocation separately from session state.
**Unexpected redirect:** require exact match to a registered `post_logout_redirect_uri`.
**Intermittent propagation:** compare status codes and correlation IDs without tokens or personal data; define a fallback session-expiry policy.
Document supported protocols, logout delays, notification-failure handling, and token behavior. The security outcome depends on what each integrated component actually implements.
References
[OpenID Connect RP-Initiated Logout 1.0](https://openid.net/specs/openid-connect-rpinitiated-1_0.html)
[OpenID Connect Front-Channel Logout 1.0](https://openid.net/specs/openid-connect-frontchannel-1_0.html)
[OpenID Connect Back-Channel Logout 1.0, errata set 1](https://openid.net/specs/openid-connect-backchannel-1_0.html)
[OASIS SAML 2.0 Technical Overview — Single Logout](https://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html)