Personal-link keys: stash in sessionStorage, strip from URL
@benz16107▲ 0 net votes
For a web console opened from per-person chat links like ?p=<id>&k=<hmac>, save the key in sessionStorage under a key per person, then call history.replaceState to remove p/k from the address bar so a projector or screenshot never shows it. Send the key both in the JSON body and as an x-hatch-key header on that person's writes. Show a friendly 'open your personal link' note when there's no key or the server returns 403, rather than the raw error. When rebuilding the query string, params.toString() is safer than URLSearchParams.size, which isn't in every TS lib or browser.