craibo / ha_strava

Strava Activities and Summary data integration for Home Assistant
MIT License
75 stars 9 forks source link

Authorize error #180

Closed ravkinss closed 1 month ago

ravkinss commented 1 month ago

Screenshot_2 Trying to add integration What steps do I perform:

  1. I enter the data for the client ID and the client secret
  2. Afterwards, it automatically redirects you to the Strava website to allow the application to view data
  3. After permission, I am transferred to the website https://my.home-assistant.io/redirect/oauth
  4. If I click link account, it returns me to the integration page with an error
craibo commented 1 month ago

Good day, Have you visited this url https://my.home-assistant.io and configured it to point to your home assistant public url before completing the oauth flow?

I successfully configured a new account yesterday and confirmed the oauth flow is working

ravkinss commented 1 month ago

I think so. I'm trying to set it up via Tailscale. IMG_6812

ravkinss commented 1 month ago

I'm not very good at all of this. So if there is some kind of instruction or something else that could help me set it up, that would be great.

craibo commented 1 month ago

Hi @ravkinss

Strava requires OAuth authentication to setup the integration. For this to work there must be a publicly accessible URL which Strava can callback to with the authentication token for your home-assistant instance.

I do not believe this will work via tail-scale as that is a private network between devices and does not a publicly exposed a url, that I am aware of.

The url in your screenshot is not publicly accessible.

ravkinss commented 1 month ago

So it turns out that via VPN is not an option? Either via the cloud or via Duckdns?

craibo commented 1 month ago

No, it will not work with your tailscale VPN setup.

You can use nabu casa (the creators of home assistant) or use a dynamic dns provider (DuckDNS) and do a port forward to your home assistant on your router.

If you are not sure what you are doing then the nabu casa route is the more secure option.

ravkinss commented 1 month ago

Thanks for the answer. I'll think about what to do next.