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.
wedding-app/apps/web
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
..
src feat: replace Cloudflare Access with email+password admin login 2026-05-04 20:31:09 +00:00
.dev.vars.example chore: scaffold Cloudflare Pages monorepo for wedding photos app 2026-05-01 23:30:50 +00:00
index.html chore: scaffold Cloudflare Pages monorepo for wedding photos app 2026-05-01 23:30:50 +00:00
package.json refactor: migrate web app to Workers + Static Assets format 2026-05-04 00:57:28 +00:00
postcss.config.js chore: scaffold Cloudflare Pages monorepo for wedding photos app 2026-05-01 23:30:50 +00:00
tailwind.config.ts chore: scaffold Cloudflare Pages monorepo for wedding photos app 2026-05-01 23:30:50 +00:00
tsconfig.json fix: web build typescript errors 2026-05-03 23:56:44 +00:00
vite.config.ts chore: scaffold Cloudflare Pages monorepo for wedding photos app 2026-05-01 23:30:50 +00:00
wrangler.toml fix: derive QR target URL from request, not stale env var 2026-05-04 02:50:59 +00:00