Repository navigation
QR login no longer drops late scans
auth.js - QR login no longer drops late scans - when the QR code rotated, the old socket was closed at the same instant, so a scan sent in the last seconds of a cycle reached a session with nothing behind it and the backend answered "session expired". The old socket now stays open for wauthparam.graceperiod seconds (default 15) so a late scan still logs in.
A dropped connection (flaky network, backgrounded tab, backend redeploy) is now reported: the QR is swapped for a refresh button, rotation stops, and the new optional wauthparam.onconnectionlost callback is called. Also fixes a socket that rotated before its handshake finished and was never closed.