Editor sockets: auth-aware reconnect, shared with the analytics view
An expired session failed the /_api/ws/editor handshake exactly like a dead network, so the page/banner editors retried forever — the WS API cannot open the login dialog. reconnect.js gains authReconnect(): on close, probe /_api/settings (dialog-less fetchJson); a 401/403 runs the paskia login flow and reconnects the moment it completes, a declined login holds at a 'session expired' ConnNote, and only transient failures take the paced backoff. A paskia auth-success message from anywhere in the page reconnects a waiting editor at once. AnalyticsView moves from its inline copy of the same flow onto the shared helper.
This commit is contained in:
1 parent
31b56c3e5e
commit
d4add54f10
7 files changed
+136
-71
No files matched your search
+2
-1
@@ -355,7 +355,8 @@ spans less than 24 hours, otherwise `week`.
|
||||
`AnalyticsView.vue` is no longer a full-screen overlay; the `body.analytics-open`
|
||||
page-chrome hiding and `#/analytics/<range>` hash routing have been removed.
|
||||
|
||||
The viewer owns its connection lifecycle. When the socket drops it probes
|
||||
The viewer owns its connection lifecycle (the probe/login mechanics are the
|
||||
shared `authReconnect` in `reconnect.js`, also used by the editor sockets). When the socket drops it probes
|
||||
`/_api/settings` (plain `fetchJson`, never pops a dialog) to tell an expired
|
||||
session from a dead network: a 401/403 runs the paskia login flow instead of
|
||||
retrying (the WS handshake cannot open the login dialog) and the stream
|
||||
|
||||
Reference in new issue
Block a user