Add authentication feature with session management
- Implemented authentication logic in src/server/auth.js, including session token creation and verification. - Integrated authentication routes for login, logout, and user session retrieval in the Fastify server. - Updated docker-compose.yml to include optional authentication environment variables. - Added @fastify/cookie dependency for cookie management in package.json and package-lock.json. - Enhanced the frontend with login form and session handling in App.svelte, including UI updates for authenticated states. - Styled authentication components in app.css for better user experience.
This commit is contained in:
@@ -19,6 +19,11 @@ services:
|
||||
# Each title is eligible again after this many hours (daily).
|
||||
WATCH_TITLE_INTERVAL_HOURS: "24"
|
||||
FLARESOLVERR_URL: http://flaresolverr:8191/v1
|
||||
# Shared login (optional). When AUTH_PASSWORD is set, the UI and /api require a session.
|
||||
# AUTH_USERNAME: admin
|
||||
# AUTH_PASSWORD: change-me
|
||||
# SESSION_SECRET: long-random-string-at-least-32-chars
|
||||
# SESSION_TTL_HOURS: "168"
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
depends_on:
|
||||
|
||||
Reference in New Issue
Block a user