SSO Session Management and Single Logout in Multi-App Environments
A practical guide to making logout reach every connected app.

SSO session management in multi-app environments depends on what happens after the identity provider ends a session. Secure logout requires reliable propagation to connected applications, plus limits on the sessions and tokens that survive a failed delivery. Back-channel Single Logout is the mechanism to prefer, but its value depends on correct session mapping, token handling, and controls that bound the remaining exposure.
Why terminating a session at the IdP is not the same as logging out
The user clicks “log out,” the browser displays a logout screen, and the task appears complete. That screen, however, does not establish that every connected application has ended its session. Developers can make the same mistake when they treat a successful identity provider response as proof of complete logout. The visible result describes only part of a distributed operation.
The separation begins at authentication. The identity provider, or IdP, issues a cryptographically signed token that a service provider, or SP, validates. The SP then manages its own local session, independently of the session at the IdP. From that point onward, the SP’s session is sovereign. It does not poll the IdP to find out whether the original session still exists.
Consequently, ending the IdP session does not itself invalidate the sessions established elsewhere. Logging out of one application likewise leaves other applications untouched unless an explicit mechanism carries the termination to them. These surviving sessions are orphaned sessions. Single Logout, or SLO, must bridge that separation.

How SAML and OIDC each define Single Logout — and what they leave unresolved
Both SAML and OIDC define logout mechanisms, and both specifications acknowledge ways those mechanisms can fail. Each protocol must coordinate state held by separate applications, some of which may be unreachable or unable to participate. A logout request starts that coordination, but does not guarantee its completion.
In SAML, the IdP or an SP initiates a LogoutRequest. The request travels to each participating SP, which invalidates its local session and returns a LogoutResponse. The IdP then sends a final response to the initiating party. The SAML specification includes a PartialLogout status code because this sequence can succeed for some participants and fail for others. Partial completion is an explicit protocol outcome.
Participation itself is not mandatory. The SAML metadata schema defines <SingleLogoutService> as “zero or more,” so an SP can comply with the specification without declaring a logout endpoint. For participants using front-channel SAML SLO, the browser carries redirects through a chain of SPs. Requests can reach later participants only if earlier participants respond.
OIDC separates logout into three mechanisms with different roles. RP-Initiated Logout lets a relying party, or application, redirect the browser to the IdP’s end-session endpoint when the user actively logs out. Front-Channel Logout distributes logout URLs through iframes or image tags in the response page, which the browser loads in parallel. The OIDC front-channel logout specification warns that blocking third-party content can prevent those requests from working. Back-Channel Logout instead has the IdP POST a signed logout token directly to each RP’s registered endpoint, without involving the browser.
These mechanisms also have to cross protocol boundaries in enterprises that use SAML for legacy applications and OIDC for modern ones. A SAML LogoutRequest arriving from a federated partner must end the local session and trigger OIDC logout for connected relying parties. That translation requires a unified, protocol-agnostic session model inside the IdP. Without that common model, the two protocol flows cannot represent one coordinated termination.
The four structural reasons SLO propagation fails in practice

The first failure is silent nonparticipation. An SP that omits its optional SAML logout endpoint is never contacted during SLO. There is no failed request to report and no PartialLogout status arising from that missing contact. Its local session keeps running after logout. This differs from a delivery failure because no delivery is attempted.
The second failure is the chain of redirects in front-channel SAML SLO. An unresponsive SP interrupts the browser’s sequence through the remaining SPs, leaving downstream applications without notification even if they are available and could process it correctly. In an environment with many applications, the chance that at least one is slow or unavailable at logout is non-trivial. A failure at one participant therefore blocks termination at others.
The third failure comes from the browser: front-channel OIDC logout relies on the browser loading each RP’s iframe or image tag, but modern browsers block third-party content by default in many configurations. Third-party cookie and content blocking is now the dominant cause of front-channel failure. A reachable logout endpoint offers no protection if the browser prevents the request from working.
The fourth failure remains possible even after every application has correctly ended its session. SLO terminates sessions, but it does not itself revoke access tokens or refresh tokens issued during them. Those tokens stay cryptographically valid until they expire unless separate token controls stop their use. An attacker with a stolen access token can therefore keep access after the user logs out.
Back-channel logout as the mechanism to prefer — and what it requires you to implement correctly
Back-channel logout removes the browser from the delivery path and is the most reliable propagation mechanism available today. The IdP sends a server-to-server POST containing a signed logout token to the RP’s registered endpoint. The RP validates the signature and terminates the matching session. The exchange works even if cookies are blocked or the user closes the browser. The application still needs server-side handling to act on the notification.
At login, the application must capture the sid claim from the ID token and store a mapping from that session ID to its internal session record. When the logout token arrives, the application uses sid to locate the session that must end. WorkOS’s back-channel logout documentation states that targeted termination is not possible if sid was not stored at login or is absent from the logout token. Without that mapping, the remaining option is to end every active session for the user, disrupting concurrent sessions beyond the intended target.
Once the matching session is located, the endSessions handler must delete its server-side session records. It must also revoke refresh tokens issued to that session, because removing session state does not revoke them automatically. Unexpired access tokens require a separate control, either a short enough lifetime to bound exposure or a denylist checked on each request. If the application also acts as an identity provider for downstream systems, it must cascade logout to them.
The handler must also tolerate repeated delivery. A network failure can cause the IdP to retry a logout token, so the application must use its jti, or JWT ID, to recognize duplicates. A short-term cache of processed jti values provides that deduplication. When a duplicate arrives, the application must return 200 OK without reprocessing it. Reprocessing can corrupt session state, making idempotency part of correct termination.
Session lifetime as the mitigation that works when logout propagation fails
Even when back-channel logout is set up correctly, it may fail to reach some connected applications. Short session and token lifetimes provide the fail-safe layer for notifications that never take effect. Propagation tries to end access at once, while expiry sets a time limit on access that logout misses. Both controls are necessary because they address different parts of the risk.
The SAML Profiles specification (§4.1.4.3) states that the security context “SHOULD be discarded” once SessionNotOnOrAfter is reached, unless the SP reestablishes the principal’s identity through the profile. Applications should follow that limit and also set a cap on how long their own sessions can last. Together, these controls prevent an orphaned session from depending entirely on a logout message for termination.
Token handling needs the same bounded approach. With short-lived access tokens, stolen or orphaned tokens are useful for only a short time, even if logout never reaches the application. Refresh token rotation issues a new refresh token on each use and invalidates the old one. If an attacker uses a compromised refresh token, the legitimate holder’s next use fails, making that compromise detectable. When the IdP session ends, back-channel logout should trigger immediate refresh token revocation, cutting off further renewal even while an existing access token remains unexpired.
These controls do not close the deprovisioning gap. The account in a connected application stays active until it is removed, and its API tokens and OAuth grants stay in place after SSO termination. Sessions already open in an application also last as long as that application allows, which in many SaaS products can be weeks or have no set end. Automatic logout and session timeout settings should therefore match the risk profile of the user and system, with regular permission audits after role changes or employee departures.
Where SLO reaches its structural limit — and what CAEP is designed to address beyond it
Even with back-channel logout set up correctly and short token lifetimes, it still handles only one kind of event, the end of a session. SLO was not designed to communicate every change that could make continued access unsafe. Roles can change, credentials can be compromised, and device posture failures can occur while a session is still active. Unless another control intervenes, those changes are left unaddressed until the next authentication.
The underlying limit is the timing of the access decision. Most connected applications make that decision at login and do not re-evaluate it once they trust the token and establish the session. A user whose account is disabled, whose role is revoked, or whose device fails a posture check can keep access until the token expires or a new SLO event fires. SLO carries the fact that a session has ended.
Heterogeneous environments make that boundary harder to manage. Legacy applications, weak or absent front-channel logout support, and inconsistent token revocation across federated services leave uneven coverage. The IdP can end its session faster than downstream applications stop trusting the access already granted. That is the practical ceiling of SLO in an estate where not every participant supports the same controls.
CAEP, the Continuous Access Evaluation Profile, is the emerging standard designed to address the broader problem. It allows an IdP or another authoritative signal source to push security events to relying parties in near-real time during an active session. Those events can report credential changes, session revocation, device posture failures, and IP risk signals. Where SLO communicates that the session has ended, CAEP communicates that the security context has changed.
For present implementations, the actionable foundation remains correct back-channel logout, sid storage at login, short token lifetimes, and enforced session caps. CAEP adoption is the next investment when the threat model requires continuous evaluation beyond session termination. SLO done correctly is achievable and worth doing, while CAEP defines the direction for the security changes that come after login but before logout.


