Impossible to reconnect to Jellyfin without plugin reinstall after the server invalidated the token
szotsaki opened this issue · 2 comments
Describe the bug
The server can invalidate the login token for many reasons: expiry, user remote logout, new version, password change, etc.
Jellycon, however, retries with the old token without the possibility to renew it.
To Reproduce
- Login to Jellyfin successfully in a way that Jellycon remembers the user/pass combo
- Change your password on the server or log out your other running sessions.
- Try to log in again which won't be successful
Expected behavior
Jellycon, after it realises that the login attempt was unsuccessful, revokes the invalid token and re-attempts to log in again without a token with the already provided auth data.
Logs
Jellyfin logs:
[INF] [19] Jellyfin.Api.Auth.CustomAuthenticationHandler: "CustomAuthentication" was not authenticated. Failure message: "Invalid token."
[ERR] [19] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "Invalid token". URL "GET" "/socket".
What I see to happen is that in jellyfin.py#L130-L133 Jellycon loads the (now expired, invalid) token from auth.json
and sends it to the server, the server rejects it, and Jellycon returns with an error.
As I see, the only way to remove this file is to uninstall the extension and reinstall it.
System (please complete the following information):
- OS: Shield
- Jellyfin Version: 10.9.2
- Kodi Version: 21.0
- Addon Version: 0.8.0