Commit Graph
19 Commits
Author SHA1 Message Date
gorkem-bwl 05945a9a74 feat: add JWT cookie infrastructure
Adds the foundation for secure cookie-based authentication without changing
the authentication flow. This prepares the codebase for moving JWT tokens
from Redux state to httpOnly cookies in a follow-up PR.

Changes:
- Added cookie-parser dependency for HTTP cookie handling
- Added cookieParser() middleware to Express application
- Created cookieHelpers.js utilities for consistent cookie options
- Includes getAuthCookieOptions() for setting secure authentication cookies
- Includes getClearAuthCookieOptions() for clearing cookies on logout

Infrastructure only - no behavioral changes to authentication flow yet.

Files added/modified:
- package.json (cookie-parser dependency)
- src/app.js (cookieParser middleware)
- src/utils/cookieHelpers.js (cookie utilities)

Next steps:
- Follow-up PR will modify JWT verification to check cookies
- Enable secure cookie-based authentication
- Add logout functionality to clear httpOnly cookies

Risk level: LOW (infrastructure only, no authentication changes)
2025-08-11 17:47:09 -04:00
Alex Holliday 1c47c8ce2c move to src 2025-07-25 15:33:48 -07:00
Alex Holliday acc910cbc0 refactor server 2025-07-25 15:15:14 -07:00
Alex Holliday cafd9f9899 remove empty file 2025-07-25 10:29:40 -07:00
Alex Holliday bb2ab8e08a format 2025-07-25 10:29:04 -07:00
Alex Holliday dc321580c3 refactor out common dependenceis 2025-07-25 10:16:29 -07:00
Alex Holliday ddf3e8251d add an error service, base controller 2025-07-24 15:06:46 -07:00
Alex Holliday d59e2796e7 refactor to monitor service 2025-07-24 13:50:21 -07:00
Alex Holliday ac2b7bd65d fix import path 2025-07-23 10:12:47 -07:00
Alex Holliday bfa6832beb format 2025-07-21 10:34:16 -07:00
Alex Holliday 38bb915144 add error handling util, update middleware and controllers 2025-07-15 16:33:35 -07:00
Alex Holliday 4cc3765e0d verify transport before sending email 2025-06-25 09:35:41 +08:00
Alex Holliday 32688ba320 add missing stack 2025-06-23 13:22:53 +08:00
Alex Holliday 0336170c8d refactor 2025-06-23 13:19:18 +08:00
Alex Holliday 9d18d55bbf increase log cache size 2025-06-23 12:19:52 +08:00
Alex Holliday 0b6febbb82 add log cache, routes, and controller 2025-06-23 11:25:42 +08:00
Alex Holliday 7072edf440 remove log statement 2025-05-05 13:59:14 -07:00
Alex Holliday 8357bd910f properly load log level from ENV, add debug log level 2025-05-05 12:48:03 -07:00
Alex Holliday 8b7e3c650b restore repo structure 2025-04-20 11:29:53 -07:00