dragonflight/services/web-ui/public
opencode cfcbec0c85 fix(auth): make AUTH_ENABLED=true workable end-to-end
Three concrete issues kept the login flow broken on dragonflight.live:

1. mam-api trusted no proxy headers, so behind nginx/Cloudflare the
   session cookie's `secure` flag and the rate-limiter's IP keying
   both saw the wrong values. Now sets `app.set('trust proxy', 1)`.

2. Session config was tied to NODE_ENV and lacked sameSite/name. Now:
   - SESSION_COOKIE_SECURE env (default: true when AUTH_ENABLED) so a
     site behind HTTPS gets Secure cookies regardless of NODE_ENV.
   - `sameSite: 'lax'` for predictable post-login redirects.
   - Renamed to `df.sid` so it's obvious in DevTools.
   - `rolling: true` extends the 7-day TTL on active use.
   - SESSION_SECRET is now required when AUTH_ENABLED=true; the
     server refuses to start with a dev default in prod.

3. login.html silently showed the sign-in panel even when no users
   exist or auth is off:
   - New GET /auth/setup-status reports {needs_setup, user_count,
     auth_enabled}.
   - login.html calls it on load and auto-flips into setup mode when
     needs_setup is true, or shows an explicit "auth is off" flash
     when auth_enabled is false (the previous symptom: logout button
     did nothing because /auth/me returned a synthetic admin no matter
     what).
   - Added a `.flash.info` style for the new neutral notice.

4. Sidebar logout used to call /auth/logout then `window.location
   .reload()`. With auth off that reload landed back on the synthetic-
   admin app and looked like nothing happened. It now redirects to
   /login.html in all states so the operator sees feedback (and the
   server-side messaging about auth being off) instead of a no-op.

Deploy notes for zampp1:
  - Set AUTH_ENABLED=true and a random SESSION_SECRET in the
    mam-api environment (e.g. /opt/wild-dragon/.env).
  - Restart mam-api.
  - First load of /login.html will auto-route to the setup form so
    you can create the first admin.
2026-05-27 02:47:09 +00:00
..
css fix: remove Google Fonts, fix editor link to :47435, fix page titles 2026-05-18 22:56:51 -04:00
downloads release: add v1.1.0 ZXP artifact (Growing tab + visual system alignment) 2026-05-26 16:09:52 -04:00
fonts web-ui: wave-1 finish — self-host fonts + multi-stage Dockerfile 2026-05-21 16:32:55 +00:00
img feat(brand): add Wild Dragon logo + favicon 2026-05-18 14:11:29 +00:00
js feat(admin): live video-presence indicators on cluster DeckLink ports 2026-05-26 22:02:38 +00:00
app.jsx chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
data.jsx chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
favicon.ico feat(brand): add Wild Dragon logo + favicon 2026-05-18 14:11:29 +00:00
icons.jsx feat(home,users): real metrics, working Users row actions + Groups CRUD 2026-05-23 03:30:10 +00:00
index.html chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
login.html fix(auth): make AUTH_ENABLED=true workable end-to-end 2026-05-27 02:47:09 +00:00
modal-new-recorder.jsx chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
screens-admin.jsx chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
screens-asset.jsx chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
screens-editor.jsx chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
screens-home.jsx feat(home): restore launcher home page; move current home to Dashboard 2026-05-23 10:48:06 -04:00
screens-ingest.jsx chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
screens-jobs.jsx chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
screens-library.jsx chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
screens-projects.jsx chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
shell.jsx fix(auth): make AUTH_ENABLED=true workable end-to-end 2026-05-27 02:47:09 +00:00
styles-asset.css chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
styles-fixes.css chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
styles-modal.css feat(web-ui): Z-AMPP screen + component CSS: styles-modal.css 2026-05-22 08:03:57 -04:00
styles-rest.css chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
styles-screens.css chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
styles.css chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00
tweaks-panel.jsx Add Z-AMPP UI: visuals + tweaks-panel: tweaks-panel.jsx 2026-05-22 08:13:37 -04:00
visuals.jsx chore: 1.2 ship-prep sweep — close 38 issues 2026-05-27 02:06:14 +00:00