From 08bbcf18b1207153983261652b4a43a9b36f386c Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Tue, 20 Jan 2026 11:34:33 -1000 Subject: Add session-based authentication Implement secure authentication using scs session manager with SQLite backing store and bcrypt password hashing. - Add users and sessions tables (migration 004) - Create internal/auth package with Service, Middleware, and Handlers - Protect all routes except /login, /logout, /static/* - Add login page template and logout button to dashboard - Default credentials: admin/changeme (configurable via env vars) Co-Authored-By: Claude Opus 4.5 --- SESSION_STATE.md | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'SESSION_STATE.md') diff --git a/SESSION_STATE.md b/SESSION_STATE.md index cff3103..8a2920b 100644 --- a/SESSION_STATE.md +++ b/SESSION_STATE.md @@ -1,19 +1,22 @@ # Session State -**Current Phase:** Phase 3: Write Operations & UI Integration -**Current Step:** Step 6: Trello Tasks Heuristic & Tasks Tab +## Active Task +None - Authentication implementation complete. -**Recent Completed Steps:** -* Phase 3 Step 1: Trello Write Ops (Backend) -* Phase 3 Step 2: Trello Lists Support -* Phase 3 Step 3: Trello UI (Boards & Add Card) -* Phase 3 Step 4: Todoist Write Ops -* Phase 3 Step 5: Fix Tasks Tab (Identified as needing Heuristic) +## Recent Changes +* **Task 002:** Implemented session-based authentication. + * Added `scs` session manager with SQLite store. + * Added `bcrypt` password hashing via `golang.org/x/crypto`. + * Created `internal/auth` package with `Service`, `Middleware`, and `Handlers`. + * Created migration `004_add_auth.sql` (users + sessions tables). + * Created `login.html` template. + * Added logout button to dashboard header. + * Protected all routes except `/login`, `/logout`, and `/static/*`. + * Default user: `admin` / `changeme` (configurable via `DEFAULT_USER`/`DEFAULT_PASS` env vars). +* **Task 001:** Removed Obsidian functionality. -**Current Focus:** -Implementing heuristics to extract actionable tasks from Trello boards and displaying them in a unified list on the Tasks tab. - -**Next Steps:** -1. Implement Heuristics in Handlers. -2. Create Trello Tasks Partial. -3. Update Tasks Tab Template. +## Next Steps +1. **Commit** the authentication changes. +2. **Test manually** by running the server and logging in. +3. **Optional:** Add auth tests to `internal/auth`. +4. **Optional:** Add password change functionality. -- cgit v1.2.3