Skip to content

feat(auth): revalidate session on WS heartbeat #124

Closed

Description

@Svagtlys

Description

WebSocket connections authenticate once at handshake (#122) and stay open even if the session row is deleted or the user deactivated. Re-check the session on each heartbeat and close with 4401/4403 when it no longer validates.

Why

Deletion/deactivation currently only takes effect on the next HTTP request; long-lived sockets bypass it.

Scope

  • Session lookup in the heartbeat path
  • Close codes 4401 (gone session) / 4403 (deactivated user)
  • Tests with a fake clock

Activity

  1. added this to the Post-1.0 milestone on Oct 6, 2026
  2. added
    enhancementNew feature or request
    area:backendCross-cutting backend (foundation, CI, testing)
    on Oct 6, 2026
  3. Svagtlys commented on Oct 12, 2026

    @Svagtlys
    OwnerAuthor

    Duplicate of #127 (revalidate session on WS heartbeat). Consolidating into #127.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:backendCross-cutting backend (foundation, CI, testing)enhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions