feat: add web viewer login page with cookie-based sessions (#7) #81

Merged
jonas.hanisch merged 1 commit from feat/web-auth-login-7 into main 2026-01-22 18:17:54 +00:00
Owner

Summary

  • Adds user-friendly login page (/login) with styled form for token input
  • Implements cookie-based session management (24h expiry, hourly cleanup)
  • Adds logout button in topbar (only shown when remote auth is required)
  • Provides auth status endpoint for UI to check authentication state

Authentication Flow

  • Localhost access: Always allowed, no auth needed
  • Remote access: Redirects to /login, validates against configured token
  • After login: Session cookie grants access until logout or expiry
  • API clients: Can still use Bearer token authentication

Test plan

  • Configure CLAUDE_MEM_REMOTE_TOKEN in settings
  • Verify /login page appears for unauthenticated remote requests
  • Test login with correct and incorrect tokens
  • Verify session persists across page refreshes
  • Test logout button clears session and redirects to login
  • Verify localhost access works without authentication

Closes #7


Generated with Claude Code

## Summary - Adds user-friendly login page (`/login`) with styled form for token input - Implements cookie-based session management (24h expiry, hourly cleanup) - Adds logout button in topbar (only shown when remote auth is required) - Provides auth status endpoint for UI to check authentication state ## Authentication Flow - **Localhost access**: Always allowed, no auth needed - **Remote access**: Redirects to `/login`, validates against configured token - **After login**: Session cookie grants access until logout or expiry - **API clients**: Can still use Bearer token authentication ## Test plan - [ ] Configure `CLAUDE_MEM_REMOTE_TOKEN` in settings - [ ] Verify `/login` page appears for unauthenticated remote requests - [ ] Test login with correct and incorrect tokens - [ ] Verify session persists across page refreshes - [ ] Test logout button clears session and redirects to login - [ ] Verify localhost access works without authentication Closes #7 --- Generated with [Claude Code](https://claude.com/claude-code)
feat: add web viewer login page with cookie-based sessions (#7)
All checks were successful
CI / build (pull_request) Successful in 20s
CI / validate-plugin (pull_request) Successful in 2s
5d41a9ea0c
Adds user-friendly authentication for the web viewer when remote access is enabled:

- Login page (/login) with styled form for token input
- Cookie-based session management (24h expiry)
- Session cleanup interval (hourly)
- Logout button in topbar (only shown when auth is required)
- Auth status endpoint for UI to check authentication state

Authentication flow:
- Localhost access: always allowed, no auth needed
- Remote access: redirects to /login, validates against configured token
- After login: session cookie grants access until logout or expiry
- API clients can still use Bearer token authentication

Closes #7

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
jonas.hanisch force-pushed feat/web-auth-login-7 from 5d41a9ea0c
All checks were successful
CI / build (pull_request) Successful in 20s
CI / validate-plugin (pull_request) Successful in 2s
to 14c1caf7c8
All checks were successful
CI / build (pull_request) Successful in 20s
CI / validate-plugin (pull_request) Successful in 2s
2026-01-22 18:17:20 +00:00
Compare
jonas.hanisch deleted branch feat/web-auth-login-7 2026-01-22 18:17:54 +00:00
Sign in to join this conversation.
No description provided.