This project includes a hidden E2E auth bridge for deterministic local tests:
window.__E2E_AUTH__.loginAdmin()window.__E2E_AUTH__.logout()
It is intentionally restricted to local emulator runs.
The bridge is enabled only when all are true:
import.meta.env.DEV === trueVITE_E2E_MODE === "true"VITE_USE_FIREBASE_EMULATOR === "true"
If these are not satisfied, the bridge is not registered.
- Production auth model is unchanged (admin email check in Firestore rules).
- The E2E bridge is designed to be stripped from production bundle paths.
- Build validation fails deployment if production bundle contains:
localhost:9099localhost:8081__E2E_AUTH__VITE_E2E_MODE
scripts/e2e/seed-emulators.mjs refuses to run unless:
FIREBASE_AUTH_EMULATOR_HOSTis setFIRESTORE_EMULATOR_HOSTis set and uses port8081- project id is explicitly allowed (
demo-project)
This prevents accidental writes outside local emulators.