YorkshireIoT / ha-google-fit

Home Assistant Google Fit Custom Component
MIT License
96 stars 10 forks source link

Error 400: redirect url mismatch #41

Closed Ivesvdf closed 1 year ago

Ivesvdf commented 1 year ago

System Health details

System Information

version core-2023.4.4
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.10.10
os_name Linux
os_version 5.10.175-3.ph4
arch x86_64
timezone Europe/Brussels
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4194 Installed Version | 1.32.1 Stage | running Available Repositories | 1273 Downloaded Repositories | 13
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Dashboards dashboards | 7 -- | -- resources | 3 views | 9 mode | storage
Recorder oldest_recorder_run | April 14, 2023 at 18:51 -- | -- current_recorder_run | April 24, 2023 at 11:01 estimated_db_size | 306.36 MiB database_engine | sqlite database_version | 3.38.5
Solcast PV Forecast can_reach_server | ok -- | -- remaining_requests | 10 rooftop_site_count | 2 polling_hours | 6 -> 21 and once at midnight

Checklist

Describe the issue

When adding the integration after entering the client id and token I'm redirected to a google page which shows 400: redirect url mismatch.

I'm not sure how to retry - restarting HA does not reprompt for credentials. Uninstalling and reinstalling the plugin does not reprompt for credentials. image

Reproduction steps

  1. Add custom repo in HACS
  2. Add integration
  3. Fill in credentials
  4. Go to next step ...

Debug logs

No

Diagnostics dump

No response

YorkshireIoT commented 1 year ago

Hi @Ivesvdf

Could you post a screenshot of what the credentials page on your Google API cloud account looks like (with you client ID + secret hidden)?

Ivesvdf commented 1 year ago

Hi, I see what you're getting at ;-). You're right I did it wrong, I should have picked web app and not Tv and limited input (like I would for google calendar). I'm guessing that'll be the issue.

Do you have a tip on how to make the HA system forget about the credentials I provided? Uninstalling and reinstalling the integration does not seem to do it. Restarting HA certainly does not.

YorkshireIoT commented 1 year ago

On the integrations page in Home Assistant if you click on the 3 dots in the top right and go to application credentials you can manage and delete credentials there.

Ivesvdf commented 1 year ago

That fixed it, learned something new. Thanks! Closing as invalid.