-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google add-ons use deprecated OAuth out-of-band (flow) #12455
Comments
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/google-tts-can-not-authorize/133906/4 |
Is there any redirect_uri that can currently be used as an alternative for Nest Binding? |
I had a look at this today and got Google TTS working by changing the redirect_uri to Then after opening the OAuth URL in your browser it will redirect and you'll then need to copy/paste the "code" URL parameter value to the Authorization Code configuration parameter in openHAB. It would ofcourse be nicer if it would redirect to openHAB itself which could then automatically use it. But at least it is a good start to get it working again. 🙂 It also works for the other add-ons like this, so I've created a few JARs using
Use the following URLs for getting an authorization code: Google STT/TTS
Nest BindingSDM
Pub/Sub
|
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/google-tts-can-not-authorize/133906/8 |
I have a few Nest Protects, which don't link up even with this method - I keep getting this after inserting the link(https://nestservices.google.com/partnerconnections/{{ProjectID}}/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&access_type=offline&prompt=consent&client_id={{ClientID}}&response_type=code&scope=https://www.googleapis.com/auth/sdm.service) and selecting my Google account:
The Nest account is migrated and works fine with logon via Google. If I replace the link in the end of the authentication link to https://www.google.com (like this https://nestservices.google.com/partnerconnections/{{ProjectID}}/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&access_type=offline&prompt=consent&client_id={{ClientID}}&response_type=code&scope=https://www.google.com) then I also get an error message (NestProtectNew being my project name):
It also seems like that there are no traits listed in the Device Access Console for Nest Protect - can it be the reason why? |
Hi @Jagohu, you should also use different URLs for getting an authorization code. I've added them to my initial comment. I ran out of time yesterday to document this and also did not have time to test all add-ons. But I now did and they all seem to work this way. 🙂
The SDM API does not support the Nest Protect, that is also clearly mentioned in the add-on docs:
|
Thanks - shoot, it's a pity that it doesn't support them - I thought from the OH documentation that it does - I missed the detail between the SDM and WWN. Well, maybe someday.. Thanks a lot! |
This replaces the deprected OOB OAuth flow used in the Nest Binding and Google SST/TTS add-ons. Instead they will now use https://www.google.com as redirect_uri. The instructions in the README and config descriptions have been updated for this change. See: https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html#disallowed-oob Fixes #12455 Signed-off-by: Wouter Born <github@maindrain.net>
This replaces the deprecated OOB OAuth flow used in the Nest Binding and Google STT/TTS add-ons. Instead they will now use https://www.google.com as redirect_uri. The instructions in the README and config descriptions have been updated for this change. See: https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html#disallowed-oob Fixes openhab#12455 Signed-off-by: Wouter Born <github@maindrain.net>
This replaces the deprecated OOB OAuth flow used in the Nest Binding and Google STT/TTS add-ons. Instead they will now use https://www.google.com as redirect_uri. The instructions in the README and config descriptions have been updated for this change. See: https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html#disallowed-oob Fixes #12455 Signed-off-by: Wouter Born <github@maindrain.net>
This replaces the deprecated OOB OAuth flow used in the Nest Binding and Google TTS add-ons. Instead they will now use https://www.google.com as redirect_uri. The instructions in the README and config descriptions have been updated for this change. See: https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html#disallowed-oob Fixes #12455 Signed-off-by: Wouter Born <github@maindrain.net>
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/nest-configuration-broken-google-throwing-an-error/135395/2 |
This replaces the deprecated OOB OAuth flow used in the Nest Binding and Google STT/TTS add-ons. Instead they will now use https://www.google.com as redirect_uri. The instructions in the README and config descriptions have been updated for this change. See: https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html#disallowed-oob Fixes openhab#12455 Signed-off-by: Wouter Born <github@maindrain.net> Signed-off-by: Nick Waterton <n.waterton@outlook.com>
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/google-tts-authentication-error-400-redirect-uri-mismatch/136695/3 |
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/openhab-3-3-release-discussion/136925/63 |
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/google-nest-device-access-console-now-available/105404/347 |
This replaces the deprecated OOB OAuth flow used in the Nest Binding and Google STT/TTS add-ons. Instead they will now use https://www.google.com as redirect_uri. The instructions in the README and config descriptions have been updated for this change. See: https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html#disallowed-oob Fixes openhab#12455 Signed-off-by: Wouter Born <github@maindrain.net>
This replaces the deprecated OOB OAuth flow used in the Nest Binding and Google STT/TTS add-ons. Instead they will now use https://www.google.com as redirect_uri. The instructions in the README and config descriptions have been updated for this change. See: https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html#disallowed-oob Fixes openhab#12455 Signed-off-by: Wouter Born <github@maindrain.net> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Was there a fix for OH-2.5.x? |
Not by me. Maybe it's time to upgrade? 😉 |
I upgraded to version 3.3.0 and found that NEST OAUTH2 authentication is not reliable. I got it to work a few times but couldn't re-authenticate using the typical work-flow has described here. Below is the error, please let me know if it is possible to enable debug trace of the actual URI that OH3 uses.
FYI, I am able to exchange the authentication token that was copied from browser URL for an access token with this command
I am not sure why OH3 is giving me that invalid grant error. Is it possible that this is the same bug that was addressed in OH-3.4 as described here: #12711 thank you, |
I can confirm that it was the bug related to the fix that was patched in version 3.4 (PR 12711). I also want to let you know that if nest sdm & pubsub credentials are defined in a static thing file, how does OH3 or nest_sdm plugin know not to exchange authorization_code for access_token again every-time the thing file is updated? I am curious, because I do not know how PR-12711 handled that scenario. |
I just realized that I am using the latest version with the said patch (PR 12711), version 3.3.0.1 As the result, at least when configuring the nest things file for the first time, SDM authorization code and pubsub authorization codes have to be provided only for the first time, after that if modification is made, user must blank out these two fields for nest sdm and pubsub to work: sdmAuthorizationCode="" Although I have not tested via web-UI, I have a feeling that it would only work with this same work-flow. I think this is a bug, we should address in the documentation website, oauth2 registration code, web UI or some sort of verbose log. PS: there is a separate issue I found with Oauth2 reading the access token response; perhaps you can look at it. thanks and sorry for the noise here! |
I don't think binding code can be made aware of which means are used for configuring Things (files/UI). So perhaps it is best to add some docs for this. |
This replaces the deprecated OOB OAuth flow used in the Nest Binding and Google STT/TTS add-ons. Instead they will now use https://www.google.com as redirect_uri. The instructions in the README and config descriptions have been updated for this change. See: https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html#disallowed-oob Fixes openhab#12455 Signed-off-by: Wouter Born <github@maindrain.net>
Some add-ons using Google APIs still use the deprecated OOB flow. It is no longer possible to create new Google OAuth tokens using the OOB flow since February 28th.
See: https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html#disallowed-oob
As a result it is no longer possible to setup the following add-ons:
These need to be changed to use one of the other flows.
The text was updated successfully, but these errors were encountered: