Closed nwithan8 closed 2 months ago
Thanks for the in-depth report and references, definitely something to look into. Could you inspect the URL you are redirected to for the login? Please adjust any secrets/sensitive data, just curious about the structure mostly.
I'm experiencing the same issue.
URL is as follows: https://app.plex.tv/auth/#?clientID=plex-rewind&code=<CODE>&forwardUrl=http%3A%2F%2Flocalhost%3A8383%3FplexPinId%<PIN>&context%5Bdevice%5D%5Bproduct%5D=Plex%20Rewind
I have the same issue
https://app.plex.tv/auth/#?clientID=plex-rewind&code=xxxxxxxxxxxxxxxxxxxxxxxxx&forwardUrl=http%3A%2F%2Flocalhost%3A8383%3FplexPinId%3Dxxxxxxxxxx&context%5Bdevice%5D%5Bproduct%5D=Plex%20Rewind
URLdecoded
https://app.plex.tv/auth/#?clientID=plex-rewind&code=xxxxxxxxxxxxxxxxxxxxxxxxx&forwardUrl=http://localhost:8383?plexPinId=xxxxxxxxxx&context[device][product]=Plex Rewind
parts of URL redacted with x
I found the solution: instead of localhost, use the internal ip in the Docker for the Site and Authentication URLs. In my case, it is http://192.168.25.83:8383
. If you have a Docker custom network, you could also use the Docker container name Plex-Rewind
, I suppose.
I use plex-rewind on UnRAID, so by default the template via Community Applications is not entirely correct.
Good catch @bpwats! Indeed when looking at the payload posted by @nwithan8, you can see that the origin and referrer are both http://172.168.1.27:8383
The NEXTAUTH_URL
and NEXT_PUBLIC_SITE_URL
should both match this in docker-compose.yml
:tada: This issue has been resolved in version 2.0.0 :tada:
The release is available on:
v2.0.0
Your semantic-release bot :package::rocket:
I use plex-rewind on UnRAID, so by default the template via Community Applications is not entirely correct.
I'm working to fix that right now. If you could share your config, that would be great.
EDIT: Was a simple enough fix. The Unraid template update should populate within 2 hours.
@nwithan8 I can confirm the Unraid template now shows a local IP address, instead of ‘localhost’.
Plex Rewind Version
main (2024-07-14) (v2.0.0)
Description
Cannot authenticate with Plex
Steps to reproduce
Screenshots
Logs
Platform
desktop
Device
MacBook
Operating System
MacOS 14.2
Browser and version
Chrome 127
Additional context
Potentially barking up the wrong tree, but comparing the authentication payloads of Plex Rewind with other Plex-authenticating appls like Tautulli and Overseer.
In Plex Rewind, the payload sent to the "pins" endpoint:
versus Tautulli
Specifically, in Tautulli, the Client Identifier is sent in the
X-Plex-Client-Identifier
header (in combination with theX-Plex-Version: Plex OAuth
header) rather than as a query parameter. The identifer is also a proper UUID, compared to the word "plex-rewind" in Plex Rewind. I believe the Plex Client Identifier needs to be a UUID (related note from Tautulli developer) Relevant source code in Tautulli: https://github.com/Tautulli/Tautulli/blob/7d00383d1ca10d4af058e4308951ab80d537b757/plexpy/http_handler.py#L50 https://github.com/Tautulli/Tautulli/blob/7d00383d1ca10d4af058e4308951ab80d537b757/data/interfaces/default/js/script.js#L617