diff options
Diffstat (limited to 'src/api/dashboard/dashboard.html')
| -rw-r--r-- | src/api/dashboard/dashboard.html | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/api/dashboard/dashboard.html b/src/api/dashboard/dashboard.html index d32fa7a..dd37f29 100644 --- a/src/api/dashboard/dashboard.html +++ b/src/api/dashboard/dashboard.html @@ -4374,7 +4374,19 @@ remakeForm.addEventListener("submit", event => { .catch(error => remakeResult("Proposing failed: " + error, true)); }); -connect(); +// Opened from another member's page (`handOver`) with a token: it begins this browser's +// session here before anything is read, with no login page in between. Without a +// session, `obtainTokens` goes to the login page. +(async () => { + if (handOver && typeof handOver.token === "string") { + try { + await tokenCall("../auth/session", handOver.token); + } catch (_) { /* a session of this browser's own may let it in still */ } + delete handOver.token; + } + connect(); + obtainTokens(); +})(); // A page not shown (another tab, a minimised window) is paused: hidden for a while, it // closes its stream, so the node stops building updates and asking members for their // links for it; shown again, it reconnects. Briefly hidden, nothing changes. |
