Network hub hook (Marty 2026-11-16): sign out everywhere, hub blocks and erases end sessions here; "Sign out everywhere" button
hubevents.js (new, byte-identical in VBB, DLB, ViralAdBlitz, DownlineHydra, 5xYourTeam): POST /api/hub/events, signed by the hub with HUB_SECRET (same hook InstantAdPay and LinkSpin take). member.signedout and member.blocked: the person is looked up by hub id (/v1/resolve, signed as bannerline) and every session of their main wallet or any contract wallet ends. member.erased: matched by the wallet SHA-256s the hub now sends with the event. Only sessions made before the event end (a replay never signs anyone out twice); a failed hub lookup answers 503 so the hub resends. Off with HUB_HOOK=0. Admin status: hubEvents (counts only). My Spots: "Sign out everywhere" next to Sign out (POST /api/auth/logout-everywhere -> networksso.signOutEverywhere, then every session of this wallet here ends). my.js?v=z2. Smoke section 9 (refused signatures, signedout in two browsers, replay, older event, blocked, erased by wallet hash, other events, hub down -> 503 -> resent, Sign out everywhere, admin view): 145/145 with UI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
return;
|
||||
}
|
||||
$('outBtn').onclick = async () => { await BL.post('/api/auth/logout'); location.reload(); };
|
||||
$('outAllBtn').onclick = async () => { $('outAllBtn').disabled = true; await BL.post('/api/auth/logout-everywhere'); location.reload(); };
|
||||
async function load() {
|
||||
const d = await BL.getJSON('/api/my');
|
||||
if (d.error) return BL.status(d.error, 'err');
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@
|
||||
<section class="hero"><h1>My Spots</h1><p class="lead">Your spots, your images and links, and every payment the contract sent you.</p></section>
|
||||
<div class="card" id="signin" hidden><h3>Sign in with your wallet</h3><p class="muted small">You sign a short message. It is free and cannot move funds or approve anything.</p><button class="btn" id="signBtn">Sign in</button></div>
|
||||
<div id="dash" hidden>
|
||||
<div class="card"><div class="row" style="justify-content:space-between"><div><span class="muted small">Signed in as</span> <span class="mono" id="me"></span></div><button class="btn quiet small" id="outBtn">Sign out</button></div>
|
||||
<div class="card"><div class="row" style="justify-content:space-between"><div><span class="muted small">Signed in as</span> <span class="mono" id="me"></span></div><span class="row" style="gap:8px"><button class="btn quiet small" id="outBtn">Sign out</button><button class="btn quiet small" id="outAllBtn" title="Ends your network sign-in on every network site">Sign out everywhere</button></span></div>
|
||||
<div class="grid2" style="margin-top:12px" id="stats"></div></div><div id="zMySpots"></div>
|
||||
<div class="card"><h3>Your share link</h3><p class="muted small">People who join through this link have you as their sponsor. It is set once, on their first spot.</p>
|
||||
<div class="field"><input id="share" readonly></div><button class="btn sec small" id="copyBtn">Copy link</button></div>
|
||||
@@ -43,7 +43,7 @@
|
||||
</main>
|
||||
<script src="/assets/common.js?v=20261115nr"></script>
|
||||
<script src="/assets/wallet.js?v=1"></script>
|
||||
<script src="/assets/my.js?v=z1"></script>
|
||||
<script src="/assets/my.js?v=z2"></script>
|
||||
<script src="/assets/chat.js?v=1" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user