mirror of
https://github.com/selfhosters-cc/container-census.git
synced 2026-01-19 21:19:32 -06:00
This commit replaces the browser's native Basic Auth prompt with a custom login page to improve user experience and avoid browser credential caching issues. Authentication Changes: - Add gorilla/sessions for cookie-based session management - Create login page with instructions for finding credentials - Add logout button (🚪 icon) to navbar - Root path (/) now redirects to /login.html when unauthenticated - Maintain backward compatibility with Basic Auth for API clients - Add SESSION_SECRET environment variable for session encryption Implementation: - internal/auth/session.go: Session middleware and management - internal/api/auth_handlers.go: Login/logout HTTP endpoints - internal/api/handlers.go: Updated routing with selective auth - cmd/server/main.go: Session store initialization - web/login.html: Login page with credential finding instructions - web/login.js: Login form handling - web/app.js: 401 redirect handling and logout function - web/index.html: Logout button in navbar Documentation: - README.md: Added SESSION_SECRET to docker-compose example - README.md: Added "Authentication Issues" troubleshooting section - scripts/run-local.sh: Added auth prompt with qwerty credentials Onboarding Tour: - Restored "Join the Selfhosting Community" telemetry opt-in step - Added updateTelemetrySettings() method - Tour now has 5 steps including community contribution option 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>