mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-12 17:00:23 +01:00
When the server revokes the token (device/session deleted), a 401 can surface from any authenticated request. Nothing cleaned it up: the dead token stayed in storage, every reload re-fired authenticated calls (401 spam, uncaught rejections) and the app lingered half-authenticated. A response interceptor on the authenticated api clears the session once on the first 401 so the app drops cleanly to the login screen. It only attaches when api.accessToken is set, so a wrong-password 401 on the login screen is never treated as session expiry. Saved credentials are kept for quick re-login.