Skip to content

Create useSessionExpiry Hook to Detect and Handle Session Timeout #91

@KevinLatino

Description

@KevinLatino

useSessionExpiry

Create useSessionExpiry Hook to Detect and Handle Session Timeout

Description:
Implement a hook that tracks session expiration and triggers a warning modal or auto-refresh when the session is about to expire. Optionally refresh token on activity.
Why it's important:
Prevents unexpected session loss and improves UX/security by prompting the user in time or refreshing session automatically.
Acceptance Criteria:

  • Detects session expiry based on a timestamp or JWT expiry.
  • Triggers modal X seconds before expiry.
  • Optionally refreshes session token on user interaction.
  • Cleans up timers and event listeners on unmount.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrontendThis is a frontendODHACK14good first issueGood for newcomersonlydust-waveContribute to awesome OSS repos during OnlyDust's open source week

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions