TLDR: How do I use my Duckdns domain for the Google Nest integration URI redirect?
I got HA exposed to the internet with its own internal and external domain from Duckdns and Let’s Encrypt: https://randomdomain.duckdns.org
and ports 443
and 8123
forwarded. I can see the “Connection Secure” window both on and off my network. Using this I got Google Home set up and I can now see all my HA devices in Google Home on my mobile device.
I now want to set up Google Nest to my HA using the integration for my camera and thermostat but I am hard stuck at the “Link to account phase,” due to the URI redirect not working.
The https://my.home-assistant.io/redirect/oauth
returns the Error 400: redirect_uri_mismatch.
If I use the </auth/external/callback>
at the end of my Duckdns domain I get the Error 400: invalid_request
I have spent hours on Google and reading posts on here that are 5+ years old trying to figure this out and I am at a loss. Any Ideas on what I am missing or a solution to this?
Solution note: If you are using a Duckdns+Lets Encrypt, before Adding NGINX to the mix, try making your Authorized redirect URI in the Google Cloud Console Credentials section look like this:
https://yourdomain.duckdns.org:443/auth/external/callback
If you still get either 400 error. Set up and configure the NGINX server to HA (there is a quick 10min video walk through) and then try it again with the above URI with port 443
added after your domain.