Files
martbost b2669cfed7 Network hub sign-in, step 3 (Marty 2026-11-15)
networksso.js (the same file on every network site): with HUB_SSO=on /sso/start asks the network hub, /sso/in takes the hub's h1. token (this site's HUB_SECRET, iss hub, aud linkspin, 60 s, single use, state cookie) and falls back once to the pairwise InstantAdPay check when the hub has nobody. networksso.page() on every GET of the main host: a signed-in member's page load tells the hub once (nsso.hp) and pings /v1/activity once a day, only while the hub answers /health.
Sessions: SESSION_TTL_HOURS (168 = 7 days in production), renewed on use at most hourly; cookie 30 days, the server's sliding expiry decides. auth.endSessions.
Sign out everywhere: POST /api/auth/logout-everywhere; the account menu's Sign out asks "Only LinkSpin or every network site"; cr-shell.js?v=20261115hub. hubsync: member.blocked and member.signedout end every session of that member here.
Chatbot: a sign-in lasts 7 days and renews; the silent check is every 2 minutes.
Tests: qa/networksso-hub.e2e.mjs (same file as InstantAdPay, in run.sh). qa sso: ALL PASSED; qa member: ALL PASSED (known warnings).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 15:36:06 -06:00

49 lines
5.9 KiB
HTML

<!doctype html>
<html lang="en" data-theme-base="light">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="robots" content="noindex, nofollow">
<title>Zones · LinkSpin</title>
<!--theme-head--><script>(function(){var A=0,h=document.documentElement,b=h.getAttribute("data-theme-base")||"light",m=window.matchMedia?matchMedia("(prefers-color-scheme: dark)"):{matches:false},v;function g(){try{v=localStorage.getItem("ls.theme")}catch(e){v=null}return v==="light"||v==="dark"||v==="auto"?v:(A?"auto":b)}function ap(){var c=g();h.setAttribute("data-theme",c==="auto"?(m.matches?"dark":"light"):c);h.setAttribute("data-theme-choice",c)}ap();if(m.addEventListener)m.addEventListener("change",ap);else if(m.addListener)m.addListener(ap);window.LSTheme={base:b,get:g,apply:ap,set:function(c,quiet){try{if(c==="light"||c==="dark"||c==="auto")localStorage.setItem("ls.theme",c);else localStorage.removeItem("ls.theme")}catch(e){}ap();if(!quiet)try{dispatchEvent(new CustomEvent("ls-theme",{detail:g()}))}catch(e){}}}})()</script><!--/theme-head-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Rajdhani:wght@600;700&family=Manrope:wght@400;500;700&family=JetBrains+Mono:wght@500;700&display=swap">
<link rel="stylesheet" href="/assets/cr.css?v=20261114tu">
<style>
.body{padding:16px 24px;display:grid;gap:16px}
.two{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:16px}
.zl .hd,.zl .rw{grid-template-columns:minmax(220px,2fr) 72px 64px 76px 72px minmax(150px,1fr) 124px}
@media (max-width:1400px){.two{grid-template-columns:1fr}}
.zl .rw>*{min-width:0}.zl .rw .pill,.zl .rw .tag{white-space:normal;line-height:1.3}.zl .rw .acts{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.q{display:inline-flex;gap:2px;vertical-align:middle;margin-right:6px} .q i{display:block;width:4px;height:10px;background:var(--line)} .q i.on{background:currentColor}
@media (max-width:900px){.two{grid-template-columns:1fr}.zl .hd{display:none}.zl .rw{grid-template-columns:1fr 1fr}.body{padding:12px 16px}}
.fr{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,2fr);gap:18px;align-items:start}
.fr-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.fr-steps li{border:1px solid var(--line);border-radius:8px;padding:12px;display:grid;gap:4px;font-size:13px}
.fr-steps li b{display:flex;align-items:center;gap:8px}
.fr-steps li b i{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;border:1.5px solid var(--line-strong);font:700 11px var(--mono);font-style:normal;flex:none}
.fr-steps li.now{border-color:var(--sig);background:var(--sig-soft)} .fr-steps li.now b i{background:var(--sig);border-color:var(--sig);color:var(--sig-ink)}
.fr-steps li.done{opacity:.75} .fr-steps li.done b i{background:var(--ok);border-color:var(--ok);color:var(--ok-ink)}
@media (max-width:1100px){.fr{grid-template-columns:1fr}.fr-steps{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.fr-steps{grid-template-columns:1fr}}
</style>
</head>
<body>
<div id="page">
<div class="body">
<div class="panel" id="firstRun" hidden><div class="fr"><div><h2 id="frTitle">Add your site</h2><div class="ink2" id="frIntro">Four steps and your site is carrying the network. Paid ads serve only on the site you name, and every viewable impression pays you ad credits.</div><div style="display:flex;gap:8px;flex-wrap:wrap;margin-top:12px"><button class="btn pri sm" type="button" id="frGo">Add your site</button><button class="btn sm ghost" type="button" id="frHide">Hide this</button><a class="btn sm ghost" href="/publishers" target="_blank" rel="noopener">How the program works</a></div></div><ol class="fr-steps" id="frSteps"></ol></div></div>
<div class="tiles" id="tiles"></div>
<div class="two">
<div class="tbl zl"><div class="hd"><span>Zone</span><span>Size</span><span class="r">Views</span><span class="r">Viewable</span><span class="r">Credits</span><span>Quality</span><span></span></div><div id="rows"></div><div class="ft" id="foot"></div></div>
<div style="display:grid;gap:16px;align-content:start">
<div class="panel" id="tagPanel" hidden><h2 id="tagTitle">Embed tag</h2><div class="code" id="tagCode" style="display:block;font-size:11px;line-height:1.6;word-break:break-all"></div><div style="display:flex;gap:8px;flex-wrap:wrap"><button class="btn sm" type="button" id="tagCopy">Copy tag</button><button class="btn sm" type="button" id="tagCheck">Check it is live</button></div><div class="muted" id="tagNote">Paste it where the banner should appear. It sizes itself.</div></div>
<div class="panel" id="audPanel"><h2>Audiences</h2><div class="ink2">Your own retargeting. Every visitor to your LinkSpin pages and your zones lands in <b>My visitors</b> for 30 days, no setup. For any other site you control, paste an audience pixel. Then, on any banner or text campaign, choose "show only to" or "never show to" an audience.</div><div id="audList" class="ink2">loading</div><div style="display:flex;gap:8px;flex-wrap:wrap"><button class="btn sm" type="button" id="audNew">+ New audience</button></div><div class="muted" style="font-size:11.5px">Counts are visitors seen in the last 30 days. The match uses a LinkSpin cookie, with a 24-hour fallback where a browser blocks cross-site cookies, so Safari and Firefox visitors on other sites match less often. Nothing personal is stored.</div></div>
<div class="panel"><h2>What runs here</h2><div class="ink2">Three tiers, in order: a LinkSpin member campaign (the same pool the ad viewer serves), then a Network Ad Space ad for 728x90 and 468x60 zones, then a LinkSpin house banner. Your site carries the whole network, not just LinkSpin.</div><div class="muted" id="rateNote"></div></div>
</div>
</div>
</div>
</div>
<script src="/assets/cr-shell.js?v=20261115hub"></script>
<script src="/assets/zones-screen.js?v=20261010a"></script>
</body>
</html>