From 1ea559c298cb778e9293a2c8f98e52906c467db6 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 4 Oct 2026 19:24:55 +0000 Subject: [PATCH] Turn off the dev sign-in stub now that Google sign-in works DEV_AUTH let anyone sign in as anyone without a password, which was fine while only tangent.fit used the gateway and Google wasn't set up. Google sign-in now works, and games, draw and 3d on reportbase.github.io sign in here, so the stub would let a stranger claim an account and spend the key. Nothing of the owner's uses it (only demo.html offers it). The wrangler.toml test now also checks DEV_AUTH is "false" in the deployed config; it fails if it is switched back on. 30 tests pass. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_015yy9hSCgHQ5WYRZu4JMuW9 --- test/worker.test.mjs | 2 ++ wrangler.toml | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/worker.test.mjs b/test/worker.test.mjs index fcbca78..0a1d08b 100644 --- a/test/worker.test.mjs +++ b/test/worker.test.mjs @@ -648,4 +648,6 @@ test('wrangler.toml allows the GitHub Pages site and no other github.io', async assert.equal(originAllowed('https://reportbase.github.io.evil.com', rules), false); assert.equal(originAllowed('http://reportbase.github.io', rules), false); assert.ok(!rules.some(r => /\*\.github\.io$/.test(r)), 'never allow *.github.io'); + // Public pages sign in here now, so the no-password dev stub must stay off. + assert.match(toml, /^DEV_AUTH\s*=\s*"false"/m, 'DEV_AUTH must be "false" in the deployed config'); }); diff --git a/wrangler.toml b/wrangler.toml index 6eac5e3..e4b77a7 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -70,7 +70,10 @@ ALLOWED_EMAILS = "" # Otherwise set this to "false" before a single real user touches it. /health # reports devAuth:true and a warning while it is on, so you cannot leave it # enabled without being told. -DEV_AUTH = "true" +# OFF (Oct 4): Google sign-in works, and three public pages on +# reportbase.github.io now sign in here, so the stub would let anyone claim an +# account and spend the key. Turn it back on only briefly, for local testing. +DEV_AUTH = "false" # Cost guards on the request itself. ALLOWED_MODELS = "" # empty = any model your key can reach