Repository navigation
Description
Description
Add a workflow step logout-user that ends the sessions of the user the workflow is processing.
It does the same as the Sign out action in the admin console (UserResource.logout()). It sets the user's not-before time and runs a backchannel logout for each user session.
steps:
- uses: disable-user
- uses: logout-user
with:
include-offline-sessions: true| Option | Type | Default | Description |
|---|---|---|---|
include-offline-sessions |
boolean | false |
Also removes the user's offline sessions. |
Value Proposition
disable-user blocks new logins, but existing sessions stay active. In #37981 the maintainers chose to keep that behavior, because ending sessions depends on the use case. A separate step lets each workflow decide.
Today this needs a call to the admin logout endpoint from outside, or a custom WorkflowStepProvider.
Goals
- Workflow step
logout-userwith the same behavior as the admin Sign out action. - Optional
include-offline-sessionsto also remove offline sessions. - Users without sessions are skipped without failing the workflow.
- Integration tests and a section in the workflows admin guide.
Non-Goals
- Changing the behavior of
disable-userordelete-user. - Logging out a single client or a single session.
- Changing the admin logout endpoint.
Discussion
No response
Notes
Setting the not-before time already makes offline tokens fail on refresh (AbstractRefreshTokenProvider checks the user's not-before and returns "Stale token"). So include-offline-sessions mainly removes the offline session records
Metadata
Metadata
Labels
Type
Fields
Value
Effort
Votes
Activity
Log out online sessions before offline sessions in logout-user step
Resolve relative URLs against an absolute root URL without a request
Notify SAML clients and identity providers in logout-user step
Add logout-user workflow step