Skip to content

Feature: Session idle timeout (server-side enforcement + client watchdog) #1502

Closed

Description

@larryro

Context

Compliance requires session termination after a defined period of inactivity (e.g. 30 min). Currently sessions have a 24h absolute expiry that is refreshed on activity in services/platform/convex/betterAuth/trusted_headers/create_session_for_trusted_user.ts — that's absolute timeout, not idle timeout.

Proposed change

  1. Add configurable sessionIdleTimeoutMs (default 30 min) on the platform security settings.
  2. On each authenticated request, compare now - session.updatedAt; invalidate if exceeded. Better Auth supports this via session.expiresIn + updateAge — confirm usage in services/platform/convex/auth.ts.
  3. Add a client-side idle hook that signs out the current tab when idle for the configured duration (prevents stale tabs displaying sensitive data).

Acceptance criteria

  • After 30 min of inactivity, the next request returns 401 and the user is redirected to login.
  • Client tab auto-signs-out after the configured idle duration.
  • Setting is configurable by org admin in Settings → Security.

Part of the security compliance baseline.

Activity

  1. added
    priority: high
    feat
    service: platform
    on Apr 13, 2026
  2. yannickmonney commented on May 31, 2026

    @yannickmonney
    Contributor

    Triaged — valid feature, keeping open. Confirmed there's currently no idle-timeout configuration in convex/auth.ts / convex/betterAuth/auth.ts (Better Auth defaults apply; the only bound is the absolute session expiry). This would add a configurable idle window with server-side enforcement plus a client tab watchdog. Assigned to me.

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

Metadata

Metadata

Assignees

Labels

featpriority: highsecurityservice: platform

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions