This repository has been archived on 2026-06-09. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Claude 9294b152b8
feat: replace Cloudflare Access with email+password admin login
Cloudflare Access self-hosted apps require a Cloudflare-managed
zone, which workers.dev is not, so the JWT path never worked. Swap
in a small login flow that fits the two-person scope:

- POST /api/admin/login validates email against ALLOWED_ADMIN_EMAILS
  and password against ADMIN_PASSWORD (constant-time compare), then
  issues an HS256-signed JWT in an httpOnly cookie.
- POST /api/admin/logout clears the cookie.
- requireAdmin verifies the cookie via hono/jwt and exposes the
  email through context.
- New /admin/login page; the dashboard redirects there on 401 and
  uses /api/admin/logout for the Sair button.

Two new env vars are required (set as secrets in the dashboard):
ADMIN_PASSWORD and SESSION_SECRET. CF_ACCESS_* are no longer used.

https://claude.ai/code/session_01TPBqgcSJMppgrpiq7fLywL
2026-05-04 20:31:09 +00:00
apps feat: replace Cloudflare Access with email+password admin login 2026-05-04 20:31:09 +00:00
packages/shared feat: implement admin panel and event management 2026-05-04 03:01:08 +00:00
.editorconfig chore: scaffold Cloudflare Pages monorepo for wedding photos app 2026-05-01 23:30:50 +00:00
.gitignore chore: scaffold Cloudflare Pages monorepo for wedding photos app 2026-05-01 23:30:50 +00:00
.npmrc chore: scaffold Cloudflare Pages monorepo for wedding photos app 2026-05-01 23:30:50 +00:00
package.json chore: scaffold Cloudflare Pages monorepo for wedding photos app 2026-05-01 23:30:50 +00:00
pnpm-lock.yaml chore: add pnpm-lock.yaml 2026-05-03 23:50:14 +00:00
pnpm-workspace.yaml chore: scaffold Cloudflare Pages monorepo for wedding photos app 2026-05-01 23:30:50 +00:00
tsconfig.base.json chore: scaffold Cloudflare Pages monorepo for wedding photos app 2026-05-01 23:30:50 +00:00