Skip to content

feat(auth): sessions last 30 days instead of 60 minutes - #151

Merged
pyramation merged 1 commit into
mainfrom
devin/1790383888-session-ttl-30d
Sep 26, 2026
Merged

pyramation merged 1 commit into
mainfrom
devin/1790383888-session-ttl-30d

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

One constant, nothing else:

-export const DEFAULT_SESSION_TTL_MS = 60 * 60 * 1000; // 60 minutes
+export const DEFAULT_SESSION_TTL_MS = 30 * 24 * 60 * 60 * 1000; // 30 days

DEFAULT_SESSION_TTL_MS feeds both the server-side session row and the JWT exp at login, so operators stop being kicked to the login screen mid-show every hour. Admin revocation from the Sessions route still ends a session immediately.

Deploy: brain only (server restart); log in once after the restart to get a 30-day token. Receiver and UI unaffected. The UI-side login-bounce fixes stay in #150 for later.

Link to Devin session: https://app.devin.ai/sessions/c4872c2982734093bdee80d04a7d5ceb
Open in Devin Desktop: https://app.devin.ai/desktop/session/c4872c2982734093bdee80d04a7d5ceb?variant=devin
Requested by: @pyramation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@luxor-code-review

luxor-code-review Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Review complete. No blocking issues — approved ✅; 1 nitpick below.

🧹 Nitpicks (1) — 🟢 1 low
  • 🟢 Stale TTL comment contradicts 30-day revocation model (sessions.ts:29) — The comment above DEFAULT_SESSION_TTL_MS (packages/settings/src/sessions.ts:29) still reads "short so revocation bites on refresh", but the same hunk changes the value to 30 days.

This single-line change raises DEFAULT_SESSION_TTL_MS from one hour to 30 days, so recorded UI sessions persist far longer before expiry-based pruning removes them. Revocation semantics are unchanged — deleting a row still rejects the matching sid — but the stale comment above the constant still describes the old 60-minute rationale.

Files Change
packages/settings/src/sessions.ts Updates DEFAULT_SESSION_TTL_MS to 30 days and leaves the adjacent comment describing the prior short-lived design.

Reviewed commit: 95c59af

@pyramation
pyramation merged commit 9780556 into main Sep 26, 2026
6 checks passed
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.

1 participant