goplaxt icon indicating copy to clipboard operation
goplaxt copied to clipboard

Oauth error

Open tonitonae opened this issue 2 years ago • 9 comments

Hi!

I was just testing Plaxt and I face a problem when self-hosting.

With the instance provided, I am able to authorize Trakt and proceed to register the Webhook in Plex and scrobble. Everything runs smoothly.

However, when I try to go self-hosted I face a problem with Oauth. The steps I have followed are:

  • Deploy Plaxt in Docker following the instructions (avoiding passing the ALLOWED_HOSTNAMES option as suggested in another issue to avoid the "oh no" issue when accessing the authorize page.
  • On that container I can access the authorization page. However, when I hit the Authorize button that sends me to Trakt I get the following error:

The requested redirect uri is malformed or doesn't match client redirect URI.

  • The URL that is being generated is:

https://trakt.tv/oauth/authorize?client_id=MYID&redirect_uri=http://192.168.2.100:8000/authorize%3fusername=MYUSER&response_type=code

  • MYUSER is a managed user, btw.
  • Log does not seem to contain nothing relevant: just the boot messages.

Am I missing something? Thanks for the help.

tonitonae avatar Sep 13 '21 10:09 tonitonae

What's the redirect URI set to in Trakt? Might be good to play with a few values there

XanderStrike avatar Sep 13 '21 21:09 XanderStrike

Thanks for the prompt reply.

Where should I look into that? I mean, I did not configure any redirect URI. It is automatically added to the authorization query sent to trakt, as shown in the OP:

https://trakt.tv/oauth/authorize?client_id=MYID&redirect_uri=http://192.168.2.100:8000/authorize%3fusername=MYUSER&response_type=code

Maybe I am missing something and that's why it is not working?

Thanks!

tonitonae avatar Sep 14 '21 05:09 tonitonae

Trakt needs to know about your redirect URI, when you created your api credentials it asked for a redirect URI, make sure that's set to the public facing IP or URI of your instance of Plaxt

XanderStrike avatar Sep 14 '21 23:09 XanderStrike

Ah, ok, I did not remember that. I just copied and pasted the suggested value:

urn:ietf:wg:oauth:2.0:oob

I do not know about the format of these URIs. How should I update it to reflect my needs?

Thanks again for your help.

tonitonae avatar Sep 16 '21 07:09 tonitonae

Sorry to hijack this issue but I get the same error as in the first post using plaxt.astandke.com.

I enter my Plex user name and then I get the following oauth error on trakt.tv: "The requested redirect uri is malformed or doesn't match client redirect URI." I'm not sure if it has anything to do with the recent changes or if Trakt has changed something or if it's an issue on my side.

Edit: Fixed now. As mentioned below, Trakt must've had a hiccup somewhere.

dazzah87 avatar Sep 30 '21 07:09 dazzah87

I am also hit by this error, both on my self-hosted and using plaxt.astandke.com. I think Trakt might have changed something here.... :?

jrhbcn avatar Oct 03 '21 10:10 jrhbcn

I am also getting this error: OAUTH ERROR The requested redirect uri is malformed or doesn't match client redirect URI.

CyberOxide avatar Oct 03 '21 11:10 CyberOxide

Just in case anyone else is struggling with this. Creating a new application API and copy back the ID and secret did the trick for me.

jrhbcn avatar Oct 10 '21 16:10 jrhbcn

Sorry just saw this, the hosted version seems to be working now though without any changes. I wonder if they just had an outage or pushed bad configuration? Wouldn't be the first time it happened.

XanderStrike avatar Oct 10 '21 16:10 XanderStrike