clean up auth, some storage improvements

This commit is contained in:
Devin Zuczek
2026-07-09 23:28:04 -04:00
parent 68d77ee4a4
commit 43c3bd93be
19 changed files with 90 additions and 278 deletions
+5 -3
View File
@@ -4,6 +4,8 @@ Shared HS256 JWT helpers for the recflare workers. Single source of truth for
token validation and generation, so the same signing/verification code isn't
re-copied per worker.
`auth` signs tokens (`generateToken`); every worker validates the incoming
Bearer token (`validateAndGetAccountId`). Both take the signing key from the
shared `JWT_SECRET` binding (see each worker's `context.ts`).
`auth` signs tokens (`generateToken`); every worker validates a request and
resolves the caller's integer account id (`validateAndGetAccountId`, which takes
the whole `Request` so how auth is carried can change in one place). Both take
the signing key from the shared `JWT_SECRET` binding (see each worker's
`context.ts`).