fix too many accounts error because the worker was behind a Cloudflare call, add username change

This commit is contained in:
Devin Zuczek
2026-08-04 21:04:00 -04:00
parent f3e2ab422c
commit 1d08ed8296
7 changed files with 340 additions and 23 deletions
+10
View File
@@ -6,6 +6,16 @@ export type Env = SharedHonoEnv & {
DOMAIN: string
/** Static-asset fetcher for the built React SPA (see wrangler.jsonc `assets`). */
ASSETS: Fetcher
/**
* Service binding to the `auth` worker — how the BFF reaches it, so the browser's real
* IP survives the hop (see wrangler.jsonc and src/upstream.ts `postAuthForm`).
*
* OPTIONAL because a deployed www always has it (it's declared in wrangler.jsonc) but
* standalone local dev doesn't: `vite dev` runs www on its own against a deployed
* DOMAIN, with no `auth` session to bind to. Absent, `postAuthForm` falls back to
* fetching auth.<DOMAIN> — the pre-binding behaviour, correct except for the IP.
*/
AUTH?: Fetcher
/**
* The Turnstile widget's public site key. Public by design — it ships to the browser so
* the widget can render — but it lives in the Secrets Store beside its secret, so one