Skip to content

Add logout-user workflow step #54231

Closed

Description

@erenkan

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-user with the same behavior as the admin Sign out action.
  • Optional include-offline-sessions to 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-user or delete-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

Activity

  1. added
    kind/enhancement
    on Oct 21, 2026
  2. added 3 commits that reference this issue on Oct 21, 2026
    de32926
    3ed0271
    c4d02a8
  3. added
    area/workflows
    status/labeled-by-bot
    on Oct 22, 2026
  4. removed
    status/labeled-by-bot
    on Oct 23, 2026
  5. added a commit that references this issue on Oct 23, 2026
    7e07aee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/workflowskind/enhancementrelease/27.0.0team/core-iam

Fields

Value

None yet

Effort

None yet

Votes

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions