website/docs/add-secure-apps/providers/single-logout/index.md
Single Logout (SLO) is a security feature that logs users out of all active applications when they log out of authentik. It uses the OAuth2/OpenID Connect front-channel and back-channel logout specifications in combination with SAML's Single Logout specification.
For example, if a user is concurrently logged into an OIDC application and two SAML applications, when the user logs out of authentik, they will automatically be logged out of all three applications. Without SLO configured, users with active sessions across multiple applications would need to manually log out of each one.
:::info Check with your service provider to see if they support SAML Single Logout or OIDC front-channel/back-channel logout. Not all service providers support these features. :::
Single Logout behavior depends on where the user initiates logout:
Logout from authentik: When a user logs out directly from authentik, the default-invalidation-flow runs. This flow includes a User Logout stage that ends the user's authentik session and triggers Single Logout for all connected applications.
Logout from an application: When a user logs out from an OIDC or SAML application, the default-provider-invalidation-flow runs. By default, this flow does not include a User Logout stage, so only that application's session is ended while the user's authentik session and other application sessions remain active.
For instructions on how to enable full Single Logout when a user logs out from an application, see Enable full Single Logout for RP-initiated logout below.
When a user logs out or their session is terminated in authentik, the following process occurs:
authentik supports both front-channel (browser-based) and back-channel (server-to-server) logout methods, depending on how each provider is configured.
Front-channel logout sends logout requests through the user's browser. authentik supports two front-channel modes:
:::info Use native front-channel mode for SAML providers if you encounter iframe compatibility issues, such as Content Security Policy (CSP) restrictions or cookie handling problems. :::
Back-channel logout sends logout requests directly from the authentik server to each provider's logout endpoint via HTTP POST.
For SAML: Requires POST SLS binding.
For OIDC: Requires a logout_uri configured for back-channel that accepts logout tokens.
By default, when a user logs out from an application (RP-initiated logout), only that application's session is ended. To enable full Single Logout that also ends the user's authentik session and logs them out of all applications, add a User Logout stage to the default-provider-invalidation-flow:
default-provider-invalidation-flow to open the flow.default-invalidation-logout.After this change, when users log out from any application, they will be logged out of authentik and all other connected applications.
If you need different logout behaviors for different applications, you can create custom invalidation flows and assign them to specific providers:
This allows you to configure full Single Logout only for sensitive applications while keeping the default behavior for others.
Enabling single logout requires configuring logout endpoints on your SAML or OIDC providers in authentik.
See the SAML Single Logout documentation for detailed instructions. You will need to:
See the OIDC Front-channel and Back-channel logout documentation for detailed instructions. You will need to:
authentik tracks provider sessions to enable single logout:
SAMLSession records containing the SessionIndex, NameID, and NameID format for each successful authentication.sid) and ID tokens required for logout requests.These session records are automatically created during authentication and deleted after logout or expiration.
Back-channel logout is always triggered when a user session is terminated via administrative actions:
These requests are processed asynchronously to avoid blocking administrative operations.