Refresh tokens seem to cause auto-soft-logout when IndexedDB is missing #21098
Labels
A-Authentication
A-Login
A-Soft-Logout
https://github.com/element-hq/element-web/issues/10224
A-Storage
Storage layer of the app, including IndexedDB, local storage, etc.
O-Uncommon
Most users are unlikely to come across this or unexpected workflow
S-Critical
Prevents work, causes data loss and/or has no workaround
T-Defect
X-Regression
Steps to reproduce
Outcome
What did you expect?
The soft logout screen should not have appeared.
What happened instead?
After being logged in for ~5 minutes, the server triggered a soft logout. It seems like the token refresh flow was used even though the environment can't support it (because IndexedDB doesn't work in Firefox private windows).
We seem to call
window.indexedDB
as a way of testing for IDB, but that no longer throws in private windows, as mentioned in this Firefox bug comment. So, our test for IDB passed, but it exploded upon actual use. I think the our IDB feature detection would need to be more like this Modernizr test which correctly detects IDB as unavailable in Firefox private windows by actually trying to open a test database. (Please don't just require IDB via Modernizr though, since that would prevent usage in private windows...)As an aside, the soft logout screen I received for this matrix.org test account only presented social login. It seems like a separate client issue, tracked in #21099.
Expand for console logs from test account
Operating system
macOS
Browser information
Firefox 99 in private window
URL for webapp
develop.element.io
Application version
135f37e-react-78524bddcef7-js-e86d8861b961
Homeserver
matrix.org
Will you send logs?
No
The text was updated successfully, but these errors were encountered: