Skip to content

Wrong client_id saved for nest integration #137280

Description

@yoyos

The problem

I have tried a lot of time to play with my new supported nest cam and integrate it with https://www.home-assistant.io/integrations/nest/
What I saw is a wrong oauth client id is saved somewhere even if I used another one in my console device access project.
I remember being asked by home assistant the first time a client_id but this id changed and I'm not able to reset it or set the new one.

So what is happening now:

1: I start the integration process
2: I add the Google Cloud Project Id
3: I add the device access project id that is using my new client id : 611302340475-uv1vdevbuicjrbcpun223csl6baqqq6i.apps.googleusercontent.com
4: I'm redirected to the wrong url -> https://nestservices.google.com/partnerconnections/27520216-0317-4025-89c0-187adaef6600/auth?response_type=code&client_id=32609749440-77if4h0k56v30c05rllnb6a15vu39oia.apps.googleusercontent.com&redirect_uri=https://my.home-assistant.io/redirect/oauth&state=(...)&scope=https://www.googleapis.com/auth/sdm.service+https://www.googleapis.com/auth/pubsub&access_type=offline&prompt=consent

The client id is the wrong one and should be 611302340475-uv1vdevbuicjrbcpun223csl6baqqq6i.apps.googleusercontent.com, not 32609749440-77if4h0k56v30c05rllnb6a15vu39oia.apps.googleusercontent.com that is the old one registered the first time.
5: If i replace the client id in the url, i'm going to the process of allowing access to my camera
6: It then returns to my homeassistant instance with the error "Google Nest - OAuth authorization error while obtaining access token" which seems normal because I had to edit the url so the verification process failed at the end.

How would you edit HA with the new client id ?

What version of Home Assistant Core has the issue?

core-2024.12.5

What was the last working version of Home Assistant Core?

core-2024.12.5

What type of installation are you running?

Home Assistant Container

Integration causing the issue

nest

Link to integration documentation on our website

https://www.home-assistant.io/integrations/nest/

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

Logger: homeassistant.helpers.config_entry_oauth2_flow
Source: helpers/config_entry_oauth2_flow.py:220
First occurred: 12:07:59 AM (3 occurrences)
Last logged: 12:27:54 AM

Token request for nest_32609749440_77if4h0k56v30c05rllnb6a15vu39oia_apps_googleusercontent_com failed (deleted_client): The OAuth client was deleted.
Logger: homeassistant.helpers.config_entry_oauth2_flow
Source: helpers/config_entry_oauth2_flow.py:339
First occurred: 12:07:59 AM (3 occurrences)
Last logged: 12:27:54 AM

Error resolving OAuth token: 401, message='Unauthorized', url='https://www.googleapis.com/oauth2/v4/token'

Metadata

Metadata

Assignees

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions