Suite: let members switch between positions they hold
A member holding #2 and #3 connected #3's wallet, closed the browser, came back, and still saw #2. Not a wallet problem: the sign-in cookie lasts 30 days and there was no sign-out anywhere on the site, so the first position he authenticated as was pinned to that browser and the wallet was never consulted again. This hits precisely the people we tell to buy several positions - the Triple Play is on /how-pay-works and in the chatbot - so it will keep happening. Adds POST /api/public/signout (drops the server session and expires the cookie) and a "not this position? switch" link beside the identity line on /suite. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -703,6 +703,14 @@ async function handleApi(req,res,pathname){
|
||||
return out;
|
||||
}
|
||||
|
||||
// Sign out / switch position. Needed because one person can hold several
|
||||
// positions (the Triple Play we actively recommend), and without this the
|
||||
// 30-day cookie pins them to whichever one they signed in as first.
|
||||
if(req.method==='POST'&&pathname==='/api/public/signout'){
|
||||
try{ messages.clearSession(req); }catch(e){}
|
||||
return json(res,200,{ok:true},{'Set-Cookie':messages.clearCookie()});
|
||||
}
|
||||
|
||||
// ── Circle Suite entitlement helper (shared by suite-me and the tools) ────
|
||||
async function suiteEntitlement(req){
|
||||
const s=messages.authFromCookie(req);
|
||||
|
||||
Reference in New Issue
Block a user