Network sign-in: same networksso.js as InstantAdPay (wallet sites); LinkSpin vouches for Downline Banners by wallet (2026-11-13)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-13 07:35:18 -06:00
parent f3fc8dfe18
commit 138c98ccec
2 changed files with 46 additions and 20 deletions
+2
View File
@@ -637,6 +637,8 @@ async function boot() {
// sessions only (the admin portal is never shared). An email that is not here yet (the 2-minute sync has not run) or is not
// let in (LS_TESTERS) gets the normal email-code sign-in with the email filled in; nothing is created by the network sign-in.
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://new.downlinebanners.com').replace(/\/+$/, '') }, // Downline Banners by wallet (2026-11-13)
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;
let email = s.email || null; if (!email && s.address) { try { const a = await accounts.byAddress(s.address); if (a && a.email) email = a.email; } catch (e) {} }