Disabling a user does not disconnect their open LiveViews #36
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Found by Nye while reviewing #34 (follow-up to #10).
Disabling a user deletes their session tokens, so new requests are refused, but LiveViews they already have open stay connected.
log_in_usernever puts:live_socket_idin the session, so the disconnect broadcast inuser_auth.ex(around line 52) never fires.Fix:
put_session(:live_socket_id, "users_sessions:#{Base.url_encode64(token)}")at login, and when an admin disables a user, broadcast"disconnect"on that topic for each session token deleted.