Network sign-in: the way back to every network site (Marty 2026-11-17)

networksso.js now also answers every site in the hub's GET /v1/sso-sites (the hand-written list
missed sites, the ViralAdSource bug), ?return=<site>&to=/path links remember the way back and
/sso/resume finishes it after the sign-in, and the deliberate-tap state lives 1 hour. Every
/go/<site> and ?return= request goes to networksso (no per-site line in server.js any more).
qa/networksso-return.e2e.mjs: a hub-only site, silent check, tap, wallet step, return links,
no open redirect. All network sign-in suites pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-17 07:10:17 -06:00
parent 03d87fbb79
commit e0ece93e9d
3 changed files with 296 additions and 15 deletions
+2 -1
View File
@@ -1461,7 +1461,8 @@ const server = http.createServer(async (req, res) => {
if (!zonePath && !supportOpen(p) && curtained(req, res, u)) return; // nothing below this line runs for an uninvited visitor
// network sign-in with InstantAdPay (2026-11-12): /go/iap, /sso/start, /sso/check, /sso/in, /api/sso/status (app host only)
if (req.method === 'GET' && !isPagesHost(req) && !isLinkHost(req) && await networksso.page(req, res, u)) return; // network hub: daily activity ping + the hub sign-in push (2026-11-15)
if (req.method === 'GET' && (p === '/go/iap' || p === '/go/viraladblitz' || p === '/go/downlinehydra' || p.startsWith('/sso/') || p === '/api/sso/status') && !isPagesHost(req) && !isLinkHost(req) && await networksso.handle(req, res, u)) return;
// every /go/<site> and every ?return=<site> link goes to networksso (2026-11-17): it knows the hub's sign-in sites, so a new site no longer needs a line here
if (req.method === 'GET' && (p.startsWith('/go/') || p.startsWith('/sso/') || p === '/api/sso/status' || u.searchParams.has('return')) && !isPagesHost(req) && !isLinkHost(req) && await networksso.handle(req, res, u)) return;
// -- the rotator redirect: one hop, recorded, on any host (LinkSpin)
let rm = /^\/r\/([a-z0-9]{4,12})$/i.exec(p);