Back-channel logout: end only the session named by sid #80
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "oidc-session-sid"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The provider's logout notice can arrive late (about 40 seconds on a real Authentik). A person who signs out and in again then lost the new session too, because Salt ended all their sessions.
iatcannot be used as a cut-off: it is stamped when the notice is sent, not when the session ended.sid(users_tokens.oidc_sid).siddeletes that user'soidc_sessionrows with that sid OR with no sid (made before this change), and disconnects exactly those pages. Password sessions and other sids stay.subdeletes all of the user's sessions of both contexts, as before.by=sidorby=suband the count, never the sid.verify_logout_token/1now returns{:ok, %{sub, sid}}; a sid that is not a non-empty string counts as none (more sessions end, never fewer).Migration
20261123090000: nullable column plus an index on(user_id, oidc_sid), no backfill, safe while the old code runs (it ignores the column). Old rows have nil and are treated as above.Reissue: provider sessions are never reissued, and no path copies a token, so nothing needs to carry the sid.
Tests: the new database tests are
:integration(CI); the verifier and token-builder tests run locally.🤖 Generated with Claude Code
https://claude.ai/code/session_01DnYzaTxC2GmdSpvCNyHNne