Logging out at an OpenID Provider does not automatically end a SaaS application’s local session. Store a mapping from the provider identity and session to each local session, then revoke the matching server-side sessions after validating an OpenID Connect back-channel logout token.
Last updated: November 17, 2026.
{
"iss": "https://id.example.com",
"aud": "web-app-client-id",
"iat": 1794924000,
"exp": 1794924300,
"jti": "logout-event-7f03",
"sid": "provider-session-91ab",
"events": {
"http://schemas.openid.net/event/backchannel-logout": {}
}
}This is the claims set inside a signed logout token, not a complete token. Accept it only after normal JWT signature, issuer, audience and algorithm validation.
Validate the logout event before revoking anything
The OpenID Connect Back-Channel Logout specification requires issuer, audience, issued-at, expiration, a unique jti, and the back-channel logout event claim. The token must identify a sid, a sub, or both, and it must not contain a nonce. Reject unsigned tokens and cache recent jti values to make replayed logout events harmless.
Key local sessions by provider issuer plus sid when session identifiers are supported. If only sub is present, the specification intends all local sessions for that provider subject to end. Make revocation idempotent so a repeated valid event still returns success without recreating state.
Keep browser logout and back-channel logout separate
For a user-initiated sign-out, clear the local session first and then use the provider’s discovered end-session endpoint. The RP-Initiated Logout specification requires an exact registered post_logout_redirect_uri; never copy an arbitrary request parameter into that redirect.
Back-channel logout is server-to-server and does not depend on third-party cookies or a browser iframe. Decide explicitly whether session logout also revokes refresh tokens; the back-channel specification distinguishes session-bound tokens from tokens issued for offline access. Monitor rejected tokens, unknown session identifiers and delayed delivery without logging complete tokens. Keep local session lifetimes bounded as a fallback, and test logout from the application, the provider’s account page, administrator revocation and repeated delivery.