Implement lightweight auth system with SQLite

Added SQLite database for session management and user preferences storage,
allowing users to have consistent settings across different sessions and devices.

Backend changes:
- Added SQLite database with users, sessions, and preferences tables
- Implemented session-based authentication alongside JWT tokens
- Created preference storage/retrieval API endpoints
- Database migrations for schema setup
- Session validation and cleanup functionality

Frontend changes:
- Added "Remember server" and "Remember username" checkboxes to login
- Created preferences service for syncing settings with backend
- Updated auth flow to handle session tokens and preferences
- Store remembered values in LocalStorage (not database) for convenience

Key features:
- User preferences persist across sessions and devices
- CalDAV passwords never stored, only passed through
- Sessions expire after 24 hours
- Remember checkboxes only affect local browser storage

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Connor Johnstone
2025-09-01 18:55:09 -04:00
parent 79f287ed61
commit 03c0011445
17 changed files with 888 additions and 47 deletions

View File

@@ -289,6 +289,27 @@ body {
cursor: not-allowed;
}
.remember-checkbox {
display: flex;
align-items: center;
gap: 0.5rem;
margin-top: 0.5rem;
}
.remember-checkbox input[type="checkbox"] {
width: auto;
margin: 0;
cursor: pointer;
}
.remember-checkbox label {
margin: 0;
font-size: 0.875rem;
color: #666;
cursor: pointer;
user-select: none;
}
.login-button, .register-button {
width: 100%;
padding: 0.75rem;