Seer integration, working prototype, and a question about authentication #324
Replies: 2 comments 1 reply
|
@HexS2 impressive work, i will try to look into login issues you raised as they seem like issues i will face once i will start the implementation, So, to answer your questions: 1- I think i will start a bigger implementation with the Litefin plugin, so i am sorry, but the PR will cause more issues i think. I thank you for this detailed implementation, honestly, if you told me before i did the Litefin plugin, we might have merged your implementation. |









Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello,
First of all I'd like to thank the team for making Litefin. I have a Tizen 5.0 TV and it's one of the only apps that runs smoothly on it!
I've built a Jellyseerr integration for Litefin and it's running on my TV.
Right now the Jellyseerr integration has the basics: a Discover page that pulls trending, popular movies and popular series from a Jellyseerr instance, searches its catalogue, and submits requests, including per-season requests for series. Status badges show what's already requested or available.
The sidebar entry stays hidden until an instance is configured, so the feature is completely invisible and makes no network calls for anyone not running Jellyseerr.
This is what I'd like your opinion on.
The obvious design is: the user signs in with their Jellyfin credentials, exactly like Jellyseerr's own web UI. I implemented that first.
POST /api/v1/auth/jellyfinsucceeds — 200, and it sets theconnect.sidsession cookie. But the cookie carriesHttpOnly; SameSite=Lax, and Litefin is served fromfile://, so its origin isnull. Every request to the instance is therefore cross-site, and aSameSite=Laxcookie is never attached to a cross-site request.Tested on my Tizen 5.0 TV (Chromium 63): login returns 200, and the very next
GET /auth/mereturns 401. I get the same result over HTTPS behind a reverse proxy and over plain HTTP straight to a LAN address, so it isn't TLS or the proxy. The app runs fromfile:///opt/usr/apps/...it shows up in the stack traces so its origin isnulland every call to the instance counts as cross-site, which is exactly when aSameSite=Laxcookie is withheld.I can't work around it from JavaScript:
Cookieis a forbidden request header andSet-Cookieis a forbidden response header, so I can neither send the cookie myself nor read it and it'sHttpOnlyon top of that.Going through the OpenAPI spec,
securitySchemesdeclares exactly two schemes,cookieAuthandapiKey, so there's no per-user token to fall back on. Quick Connect looked promising, but/auth/jellyfin/quickconnect/authenticate"creates a user session" and returns aUser, so as far as I can tell it lands on the same cookie I didn't test that one end to end.So right now I've gone with the API key that Jellyseerr provides, and it works fine, but a Jellyseerr API key is instance-wide and admin-scoped, which raises two fair objections.
POST /requestaccepts auserId, so requests are credited to them against their own quota.There's also a UX problem: a Jellyseerr API key is about 68 characters, and typing that on a remote is hell. I made the field unmasked so at least a typo can be spotted, and it's validated immediately on save, but I haven't found a way to make the entry itself less painful.
So, three things I'd like your opinion on:
Either way, thanks for the app and happy to rework or reshape this into whatever fits the project.
EDIT: I saw this issue: #279 (comment), and right now, I think the best way to authenticate with Seer is to use the Litefin plugin, like Moonfin does. Using Jellyfin Enhanced's API seems limited.
All reactions