Network sign-in: the way back after signing in on InstantAdPay (Marty 2026-11-17)
networksso.js (the shared file, same in every network site): providers now also know every site in the hub's GET /v1/sso-sites, ?return=<site>&to=/path links on IAP/LinkSpin remember the way back, a missing wallet sends the member to the provider's wallet step first and then back, and the deliberate-tap state lives 1 hour (was 20 minutes) so a sign-up has time. Join links to InstantAdPay carry ?return=<this site>&to=/my. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -133,7 +133,10 @@ const PAGES = { '/': 'index.html', '/team': 'team.html', '/cards': 'cards.html',
|
||||
'/terms': 'terms.html', '/disclaimer': 'disclaimer.html', '/privacy': 'privacy.html', '/builder': 'builder.html' };
|
||||
const RESERVED = new Set(['api', 'assets', 'art', 'go', 'r', 'sso', 'health', 'promote', 'sitemap.xml', 'robots.txt', 'favicon.ico', 'index.php', 'team', 'cards', 'join', 'ledger', 'contract', 'admin', 'terms', 'disclaimer', 'privacy', 'builder', 'members', 'draft', 'board']);
|
||||
const challenges = new Map();
|
||||
const joinUrl = ref => ref ? C.joinUrl.split('{ref}').join(encodeURIComponent(ref)) : C.joinUrl.replace(/\/join\/\{ref\}.*$/, '/').replace(/[?&]ref=\{ref\}/, '').split('{ref}').join('');
|
||||
// a join link to InstantAdPay or LinkSpin carries the way back here (2026-11-17, Marty: "it never had a return path back"): the
|
||||
// provider remembers ?return=<this site>&to=/my and, after the sign-up or sign-in (and the wallet step), sends the member back
|
||||
const withReturn = url => { try { const x = new URL(url); if (!/^(www\.)?(instantadpay\.com|linkspin\.app)$/.test(x.hostname) && x.origin !== new URL(C.iapBase).origin) return url; x.searchParams.set('return', C.siteId); x.searchParams.set('to', '/my'); return x.toString(); } catch (e) { return url; } };
|
||||
const joinUrl = ref => withReturn(ref ? C.joinUrl.split('{ref}').join(encodeURIComponent(ref)) : C.joinUrl.replace(/\/join\/\{ref\}.*$/, '/').replace(/[?&]ref=\{ref\}/, '').split('{ref}').join(''));
|
||||
const short = a => a ? a.slice(0, 6) + '...' + a.slice(-4) : '';
|
||||
const display = a => { const m = store.member(a); return m && m.username ? m.username : short(a); };
|
||||
const isCoach = a => store.positionsOf(a) > 0;
|
||||
|
||||
Reference in New Issue
Block a user