fabro/apps/fabro-web
Bryan Helmkamp 710f9869f0
fix(auth): stop demo mode from overriding authentication
The demo router hardcoded AuthMode::Disabled, which caused /auth/config
and /auth/me to lie and let demo endpoints be reached without a session
whenever the fabro-demo=1 cookie was set. With the cookie set on a
GitHub-configured server, /login rendered "Paste your dev token" with
no input and no GitHub button because /auth/config returned empty
methods.

Have the demo router inherit the real AuthMode so demo mode is purely a
data-source toggle: authentication is identical regardless of the
cookie. Update the translate test that locked in the old bypass, add a
companion test for the authed happy path, and add a regression test
that /auth/config returns real methods under the demo cookie.

As defense in depth, the login page now renders an explicit "no
authentication method is configured" state when methods is empty
instead of the misleading dev-token prompt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 16:02:49 -04:00
..
app fix(auth): stop demo mode from overriding authentication 2026-04-21 16:02:49 -04:00
public refactor(web): drop light mode, go dark-only 2026-04-20 09:27:08 -04:00
scripts feat(install): add browser-based setup flow 2026-04-19 11:20:58 -04:00
.dockerignore Rename Arc to Fabro in TypeScript/JavaScript 2026-03-12 11:13:18 -04:00
.gitignore Rename Arc to Fabro in TypeScript/JavaScript 2026-03-12 11:13:18 -04:00
index.template.html refactor(web): drop light mode, go dark-only 2026-04-20 09:27:08 -04:00
package.json build(web): upgrade @pierre/diffs to 1.1.15 2026-04-19 17:00:50 -04:00
tsconfig.json Fix login route collision after SPA cutover 2026-04-01 21:55:30 -07:00