Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Rathan-Naik
Copy link
Contributor

Centralize logout logic in UserSessionUtil.logoutAllUserSessions(). Add setNotBeforeForUser to invalidate tokens before deletion. Skip setNotBeforeForUser for lightweight users (they don't persist). Trigger backchannel logout for all user sessions (online and offline). Apply to all three deletion paths:

  • Admin API deletion (UserResource.deleteUser)
  • Self-service deletion (DeleteAccount.processAction)
  • Workflow deletion (DeleteUserStepProvider.run)

This ensures that when a user is deleted, all clients with backchannel logout URLs configured are notified via backchannel logout requests.

Closes #45120

Centralize logout logic in UserSessionUtil.logoutAllUserSessions().
Add setNotBeforeForUser to invalidate tokens before deletion.
Skip setNotBeforeForUser for lightweight users (they don't persist).
Trigger backchannel logout for all user sessions (online and offline).
Apply to all three deletion paths:
- Admin API deletion (UserResource.deleteUser)
- Self-service deletion (DeleteAccount.processAction)
- Workflow deletion (DeleteUserStepProvider.run)

This ensures that when a user is deleted, all clients with backchannel
logout URLs configured are notified via backchannel logout requests.

Closes keycloak#45120

Signed-off-by: Rathan Naik <[email protected]>
@Rathan-Naik Rathan-Naik force-pushed the feature/backchannel-logout-on-user-deletion branch from e6fa01c to 219a647 Compare January 16, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OIDC BackChannel logout does not get called when the user gets deleted

1 participant