fix(jellyfin): persist session on password login - #3
Merged
selmant merged 3 commits intoAug 13, 2026
Merged
Conversation
Owner
|
Looks good from my side. Any reason this is still in draft? If there's nothing else planned, feel free to mark it ready for review. |
arqueon
marked this pull request as ready for review
August 13, 2026 12:50
Co-authored-by: Cursor <cursoragent@cursor.com>
|
This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged. |
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Description
Password-based Jellyfin and Emby login authenticated existing users successfully but discarded the personal access token returned by the media server. The global server integration continued to work, while user-scoped features such as Continue Watching treated the account as unlinked. The owner account made this particularly difficult to recover from because it cannot unlink its primary media-server identity in the UI.
This change persists the returned access token and device ID for an existing user, matching the behavior already implemented by Quick Connect. It also stores the access token when password login creates a new imported user. A regression test covers an existing Jellyfin user with a missing personal session.
AI Disclosure: Codex was used to diagnose the production behavior, inspect the relevant authentication paths, generate the initial code and regression test, run validation, and draft the PR text and responses. I reviewed the change, its focused scope, the test results, and the contribution requirements before approving submission.
How Has This Been Tested?
Tested with the repository's declared Node.js 24 runtime and pnpm 10.24.0:
pnpm test server/routes/auth.test.ts— 48 tests passedpnpm typecheck:serverpnpm exec eslint server/routes/auth.ts server/routes/auth.test.tspnpm exec prettier --check server/routes/auth.ts server/routes/auth.test.tspnpm buildgit diff --checkThe regression test authenticates an existing Jellyfin user whose personal token is absent, then verifies that the returned token and the selected device ID are persisted.
Screenshots / Logs (if applicable)
Not applicable; this is a server-side authentication persistence fix with no UI changes.
Checklist:
pnpm buildpnpm i18n:extract(Not applicable; no UI strings changed.)