Skip to content

feat(auth): #63: add session inactivity timeout and auto-lock - #74

Merged
imdeepmind merged 1 commit into
developfrom
#63
Aug 29, 2026
Merged

feat(auth): #63: add session inactivity timeout and auto-lock#74
imdeepmind merged 1 commit into
developfrom
#63

Conversation

@imdeepmind

Copy link
Copy Markdown
Owner

Summary

Adds a configurable session inactivity timeout and auto-lock mechanism for the desktop application.

Changes

  • Go Backend (internal/features/auth):
    • Track lastActiveAt on Session.
    • Add TouchSession() Wails binding to update lastActiveAt when user activity occurs.
    • Implement inactivity expiration check in GetSession(), RequireSession(), and CurrentClient(). Upon expiration, the session is cleared and the database connection is closed.
  • Settings (internal/features/settings):
    • Add InactivityTimeoutMinutes (default: 15; options: 1 min, 5 min, 15 min, 30 min, 0/Disabled) to Settings struct and UpdateSettingsInput.
    • Sync timeout preference with auth.Service.
  • React Frontend:
    • Add throttled activity listeners in AuthContext to ping TouchSession() every 10s when active.
    • Periodic background check every 5s to navigate user to Login screen when session expires.
    • Added Session Security & Auto-Lock UI in ApplicationSettings.tsx.

Closes #63

@imdeepmind
imdeepmind merged commit 2cc72d3 into develop Aug 29, 2026
6 checks passed
@imdeepmind
imdeepmind deleted the #63 branch August 29, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session never expires: add inactivity timeout / auto-lock for signed-in desktop session

1 participant