Closed jayscovill closed 4 years ago
If you can access HA using the internal ip simply add that in the redirect_uri in trakt. (http://
Isn’t that already in the URI? Where else would I add it?
You need to put it in the trakt app settings in trakt website.
Thanks! That did the trick!
Edit: well almost. Trakt doesn’t appear in the Integrations list after it’s done.
Edit again. OK it is but the display name is mangled and doesn’t contain ‘Trakt.tv’
I cannot get my integration to work either. If I use https://mydomain.duckdns.org/auth/external/callback
it gives "OAUTH ERROR: The requested redirect uri is malformed or doesn't match client redirect URI".
If I replace the OAUTH redirect uri with my internal ip: http://192.168.178.22:8123/auth/external/callback
I get "Missing code or state parameter"
I can't get any further than that.
When you configure the integration check the redirect uri that appears in the new page that opens. Make sure this redirect_uri is configured in the trakt application on trakt website.
I've tried all 3 of the following and none of them work:
https://mydomain.duckdns.org/auth/external/callback http://192.168.178.22/auth/external/callback http://192.168.178.22:8123/auth/external/callback
Did you check the redirect_uri that shows in the address bar when a new page opens?
I'm not sure what you mean, sorry.
When you create a new Trakt integration you should see a new page opens (just like the page where you got OAUTH error). In that page check the address bar and find the value next to ?redirect_uri=
.
redirect_uri=http:/mydomain.duckdns.org/auth/external/callback
great, make sure to copy the exact same uri and add it in the trakt application settings (under redirect_uri)
If I do do that it just causes a 500 error because the NGINX Proxy redirects to https, and this presumably causes an infinite redirect loop. The NGINX Proxy addon removes the need for a port and makes the site available only via https/domain externally and http/local-ip locally.
if you are using a doamin your base_url should start be https://<your-domain>
. This will make the redirect_uri be the same as the base_url.
Ok, but the Nginx Proxy addon says to remove that from the config.
@engrbm87 So, I added the base url back into to my config then ran the trakt integration process again. This now shows the correct redirect in the QueryString but clicking on authorise just results in a WSOD. Refreshing the page just throws out a 500 error.
However, returning back to the HA Integrations tab shows a "success" message indicating that the integration has been added. I'll see if this now works.
Having a similar issue, instead of my cloudflared domain, it shows &redirect_uri=https://my.home-assistant.io/redirect/oauth&state=[a bunch of random letters]
. I also get Missing state parameter
when it directs me to https://mydomainname.cf/auth/external/callback?code=[random letters and numbers]
same issue, missing state parameter
When you create a new Trakt integration you should see a new page opens (just like the page where you got OAUTH error). In that page check the address bar and find the value next to
?redirect_uri=
.
This is the solution for me. I was getting all kinds of problems with 'missing state parameter' trying local ip and external ip. this redirect_uri value was https://my.home-assistant.io/redirect/oauth so i put this into traktv uri link and it worked.
Homeassisant version: ,108.6
Integration version: 1.1
Configuration
Configuration.yaml:
trakt: include trakt.yaml:
trakt.yaml:
client_id: !secret trakt_id client_secret: !secret trakt_secret
Describe the bug
When adding the integration the trakt API page returns:
The requested redirect uri is malformed or doesn't match client redirect URI.
https://api-v2launch.trakt.tv/oauth/authorize?response_type=code&client_id=&redirect_uri=http://:8123/auth/external/callback&state=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmbG93X2lkIjoiNDI1ODQwZTkyY2NiNDVjNThmOTMzYzAwZjI5ZTJiMDAifQ.zu3D4s6NO-XzUK1pdeNz4cANz36rPDUpUfjGYAZaIjo
I do have a base_url defined and am using an nginx proxy to allow remote access to Hassio for the mobile app but it is using the internal IP in the callback.