From d59685dac57a85b1d4bb43da64ba4724174938eb Mon Sep 17 00:00:00 2001 From: DashCaddy Polish Loop Date: Wed, 14 Oct 2026 06:14:29 -0700 Subject: [PATCH] [grade=A] Register rev.sami in DashCaddy login-page map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add 'rev' to the buildLoginPage pages map in sso-gate.js. Without it, /api/v1/auth/login-page?service=rev returned 404 'Unknown service' — the TOTP login page is built from a hardcoded per-service map, so registering rev in services.json alone was not enough. This blocked the graded rev-dashboard deploy's final acceptance probe (https://rev.sami/ -> 200) after every internal check had passed. rev needs no app-token (plain web app behind the TOTP gate, same shape as sec): after check-session verifies the session it redirects to /?direct=1, bypassing the rev.sami Caddy @needsAutoLogin loop. Verified post-restart: service=rev -> 200, https://rev.sami/ -L -> 200 (TOTP shell, gate fail-closed), service=sec still 200, unit active. Codex grade A (urn:ump:t35savf2lk2rs236npuen42uc5cjlcga7mofy6ewdtijkpq7krta). --- dashcaddy-api/routes/auth/sso-gate.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dashcaddy-api/routes/auth/sso-gate.js b/dashcaddy-api/routes/auth/sso-gate.js index cf60f25..03fe8aa 100644 --- a/dashcaddy-api/routes/auth/sso-gate.js +++ b/dashcaddy-api/routes/auth/sso-gate.js @@ -398,6 +398,14 @@ ft('chat').then(function(r){return r.text()}).then(function(t){ title: 'Signing in to Security...', bg: '#070b10', accent: '#58a6ff', body: `d.textContent='Session verified, opening dashboard...';go('/?direct=1');` }, + rev: { + // rev.sami — revenue dashboard. Same shape as sec: a plain web app + // behind the TOTP gate with no app-specific token. The rev.sami Caddy + // block carries the identical @needsAutoLogin matcher (path / , not + // query direct=1), so ?direct=1 bypasses the redirect loop the same way. + title: 'Signing in to Revenue...', bg: '#0a0f0c', accent: '#34d399', + body: `d.textContent='Session verified, opening dashboard...';go('/?direct=1');` + }, }; const cfg = pages[service];