Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 2026
selmant
added a commit
to selmant/better-trakt
that referenced
this pull request
Oct 23, 2026
… de-authorizing jellyfin#343 Original author: @zotabee. Thanks for the contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
De-authorizing a user sent the token revoke through
PostToTrakt<T>, which doesn't fit this request in two ways:JsonException, so every de-authorization logged "Exception handled in PostToTrakt", although the token was revoked.PostToTrakt<T>refreshed it first, while the revoke still named the old token. The new token stayed valid on trakt.tv, and the plugin deleted its copy.The revoke now goes through the plain
PostToTraktthat the other OAuth requests use: it sends the stored token, doesn't refresh it and doesn't read the body. A failed revoke is logged as a warning with its status code; the user is still removed either way.Tested with the real
DeauthorizeDeviceagainst a fake trakt.tv:JsonExceptionHttpRequestExceptionCouldn't revoke the access token on trakt.tv: 500Also checked against trakt.tv with the plugin's client id: the revoke returns 200 with an empty body, a token revoked without an Authorization header (as this PR sends it) is rejected right after, and revoking the previous token after a refresh leaves the new one valid (still accepted 6 minutes later). On my Jellyfin 12.1 server, de-authorizing a user logged the
JsonException, and its token was rejected afterwards.Builds with no warnings. Merges cleanly with #328, which leaves the revoke out of its debug logging; with this change the revoke no longer goes through that code.