Skip to content

fix(security): use maxAge instead of expires for session cookies#209

Merged
zainfathoni merged 1 commit intomainfrom
fix/login-session-cookie
Jan 23, 2026
Merged

fix(security): use maxAge instead of expires for session cookies#209
zainfathoni merged 1 commit intomainfrom
fix/login-session-cookie

Conversation

@zainfathoni
Copy link
Copy Markdown
Owner

Closes #rb-login-broken

Description

Session cookies were expiring immediately because the expires date was calculated at server startup time. After 7+ days of server uptime, all new cookies would have an expiration date in the past, breaking login completely.

Changes

  1. Fixed session cookie expiration - Changed expires to maxAge in session.server.ts
  2. Added error feedback - Login page now displays errors when email verification fails (burner email, invalid format)
  3. Added ErrorAlert component - New red alert component for error messages

Current Tasks

  • Fix session cookie expiration bug
  • Add error display on login page
  • Run unit tests
  • Run E2E tests

Session cookies were expiring immediately because the expires date was
calculated at server startup time. After 7+ days of server uptime, all
new cookies would have an expiration date in the past.

Also adds error feedback display on login page when email verification
fails (e.g., burner email, invalid format).

Closes rb-login-broken

Amp-Thread-ID: https://ampcode.com/threads/T-019bed38-9b38-74b0-8aa7-70eaf424dcc6
Co-authored-by: Amp <amp@ampcode.com>
@zainfathoni zainfathoni merged commit 6fd10a5 into main Jan 23, 2026
8 checks passed
@zainfathoni zainfathoni deleted the fix/login-session-cookie branch January 23, 2026 23:49
zainfathoni added a commit that referenced this pull request Jan 25, 2026
Session cookies were expiring immediately because the expires date was
calculated at server startup time. After 7+ days of server uptime, all
new cookies would have an expiration date in the past.

Also adds error feedback display on login page when email verification
fails (e.g., burner email, invalid format).

Closes rb-login-broken

Amp-Thread-ID: https://ampcode.com/threads/T-019bed38-9b38-74b0-8aa7-70eaf424dcc6

Co-authored-by: Amp <amp@ampcode.com>
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