Skip to content

fix(jellyfin): support Jellyfin 12 authorization (v1.6.1) - #129

Merged
retardgerman merged 3 commits into
mainfrom
dev
Sep 11, 2026
Merged

retardgerman merged 3 commits into
mainfrom
dev

Conversation

@retardgerman

@retardgerman retardgerman commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Problem

Jellyfin 12.0 disables legacy authorization by default, and its migration turns it off on existing installs too. Anchorr authenticated only via X-MediaBrowser-Token and the api_key query parameter, so every Jellyfin request returned 401 after upgrading: no notifications, no library list, no WebSocket.

Fix

  • All Jellyfin calls use the standard Authorization: MediaBrowser header, the WebSocket handshake uses ApiKey. Both work on 10.10.x and 12.x, so no config change is needed.
  • A missing or malformed API key is rejected before the request instead of producing another indistinguishable 401.
  • WebSocket auth rejections log the real cause instead of looping silently on reconnect.
  • Raw axios errors are no longer passed to the logger on Jellyfin paths, where the serialized config.headers wrote the auth header into logs/ in cleartext.

Jellyfin 12.0 disables legacy authorization by default and a migration turns
it off on existing installs too, so the X-MediaBrowser-Token header and the
api_key query parameter no longer authenticate. Every Jellyfin request came
back 401 after the upgrade.

Switch to the standard Authorization header with the MediaBrowser scheme via
a shared jellyfinAuthHeaders() helper, and move the WebSocket handshake to
the ApiKey query parameter. Both are accepted by 10.10.x and 12.x, so no
version switch is needed.

The helper rejects a missing or malformed API key instead of sending a
well-formed header with a wrong token, which would only surface as a generic
401. WebSocket auth rejections now log the actual reason rather than looping
silently on reconnect.

Also stop passing raw axios errors to the logger on the Jellyfin paths: the
serialized error carries config.headers, which would write the Authorization
header to disk in cleartext.
@retardgerman retardgerman changed the title Release v1.6.1 fix(jellyfin): support Jellyfin 12 authorization (v1.6.1) Sep 11, 2026
@retardgerman
retardgerman merged commit d54e29f into main Sep 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant