Commit Graph

5 Commits

Author SHA1 Message Date
Rokojori 7fa8811896 feat: jwtMiddleware proactive cookie rotation, AuthPayload iat/exp
jwtMiddleware now rotates the access-token cookie proactively when
within PROACTIVE_REFRESH_MARGIN_SEC (15 min) of real expiry, using the
server's own clock. Removes the need for client-side exp comparison
(impossible anyway for httpOnly cookies). AuthPayload gains iat/exp
fields for callers that need to inspect token lifetime.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-02 22:38:53 +02:00
Rokojori cb2fba6e8b auth: Bearer-before-cookie token extraction; JWT_CLOCK_TOLERANCE for clock skew
extractToken now checks Authorization: Bearer before the accessToken cookie so
injected headers (Electron, API clients) cannot be shadowed by stale cookies.
JWT_CLOCK_TOLERANCE env var (seconds) is passed to jwt.verify as clockTolerance
when non-zero — set in .env for local dev to absorb clock skew vs production.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-18 08:37:26 +02:00
Rokojori 0b06c252a3 Connector Update 2026-07-17 15:26:14 +02:00
Rokojori 73fe3a3c9a Update Paths for Submodule 2026-07-17 13:16:49 +02:00
Rokojori e2b37b8820 Initial Commit 2026-07-17 09:38:05 +02:00