From b2b670df143f7f007caa1ffa3fd802426d290466 Mon Sep 17 00:00:00 2001 From: martbost Date: Sun, 15 Nov 2026 08:39:12 -0600 Subject: [PATCH] Network sign-in for DownlineHydra (2026-11-15, same change as InstantAdPay 1c06c58): networksso NAMES downlinehydra (same file as IAP), wallets.downlinehydra = DH_URL (default https://downlinehydra.com; staging https://dh.saasy.top until the domain switch), /go/downlinehydra and /go/viraladblitz hops Co-Authored-By: Claude Opus 5.5 --- networksso.js | 2 +- server.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/networksso.js b/networksso.js index 28b9af3..f793737 100644 --- a/networksso.js +++ b/networksso.js @@ -39,7 +39,7 @@ const BACK_AGE = 1200; // seconds: the provider remembers an unf const TRIED_AGE = 1800; // seconds: one silent check per browser per 30 minutes const OFF_AGE = 12 * 3600; // seconds: no silent check after a sign-out on this site const HINT_AGE = 300; // seconds: the email prefill when the member is not here yet -const NAMES = { iap: 'InstantAdPay', linkspin: 'LinkSpin', bannerline: 'Downline Banners', vbb: 'Viral Banner Blitz', viraladblitz: 'ViralAdBlitz' }; // vbb = Viral Banner Blitz, a wallet site like Downline Banners (2026-11-14); viraladblitz = ViralAdBlitz, a wallet site like VBB (2026-11-15) +const NAMES = { iap: 'InstantAdPay', linkspin: 'LinkSpin', bannerline: 'Downline Banners', vbb: 'Viral Banner Blitz', viraladblitz: 'ViralAdBlitz', downlinehydra: 'DownlineHydra' }; // vbb = Viral Banner Blitz, a wallet site like Downline Banners (2026-11-14); viraladblitz = ViralAdBlitz, a wallet site like VBB (2026-11-15); downlinehydra = DownlineHydra (2026-11-15) const WALLET_RE = /^0x[0-9a-f]{40}$/; let C = null; // { self, peer, peerBase(), isProd, dataDir, db, member(req), accept(email, req, v), signIn(email, req, v), landing(to), signinPath(to), defaultPath, diff --git a/server.js b/server.js index cdb62e2..5dc3aa2 100644 --- a/server.js +++ b/server.js @@ -646,7 +646,8 @@ async function boot() { networksso.init({ self: 'linkspin', peer: 'iap', peerBase: IAP_BASE, isProd: IS_PROD, dataDir: DATA_DIR, db, defaultPath: '/ads', wallets: { bannerline: () => String(process.env.BL_URL || 'https://downlinebanners.com').replace(/\/+$/, ''), // Downline Banners by wallet (2026-11-13) vbb: () => String(process.env.VBB_URL || 'https://viralbannerblitz.com').replace(/\/+$/, ''), // Viral Banner Blitz by wallet (2026-11-14) - viraladblitz: () => String(process.env.VAB_URL || 'https://viraladblitz.com').replace(/\/+$/, '') }, // ViralAdBlitz by wallet (2026-11-15; VAB_URL = staging host until the domain switch) + viraladblitz: () => String(process.env.VAB_URL || 'https://viraladblitz.com').replace(/\/+$/, ''), // ViralAdBlitz by wallet (2026-11-15; VAB_URL = staging host until the domain switch) + downlinehydra: () => String(process.env.DH_URL || 'https://downlinehydra.com').replace(/\/+$/, '') }, // DownlineHydra (2026-11-15; DH_URL = https://dh.saasy.top until the domain switch) wallet: async s => { const a = await accounts.byEmail(s.email); const addr = String(s.address || (a && a.address) || '').toLowerCase(); return addr ? { address: addr, name: '' } : null; }, member: async req => { // a wallet sign-in carries the address, not the email: find the account that owns the wallet (2026-11-13) const s = await auth.fromRequest(req); if (!s) return null; @@ -1440,7 +1441,7 @@ const server = http.createServer(async (req, res) => { // support must reach everyone, invited or not (2026-10-16): someone locked out or not yet let in is exactly who needs it 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' && (p === '/go/iap' || p.startsWith('/sso/') || p === '/api/sso/status') && !isPagesHost(req) && !isLinkHost(req) && await networksso.handle(req, res, u)) return; + 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; // -- the rotator redirect: one hop, recorded, on any host (LinkSpin) let rm = /^\/r\/([a-z0-9]{4,12})$/i.exec(p);