Update the steps of obtaining the auth code - Google Chat (#24491)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Klaas Schoute 2022-10-25 22:52:30 +02:00 committed by GitHub
parent 5d97ae9450
commit b178319336
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,24 +25,22 @@ There is currently support for the following device types within Home Assistant:
If you are sure your email and password are correct, but the integration says the login is invalid then you would need to use the manual authentication method.
To use the manual method, first you would need to obtain an authorization code (see <a href="#steps-to-obtain-authorization-code">instructions below</a> for details).
Once the code is obtained fill in the form with your email, password and the authorization code to complete authentication.
To use the manual method, first, you would need to obtain an authorization code (see [instructions below](#steps-to-obtain-authorization-code) for details). Once the code is obtained, fill in the form with your email, password, and authorization code to complete authentication.
### Steps to obtain Authorization Code:
1. To obtain your authorization code, open [this URL](https://accounts.google.com/o/oauth2/programmatic_auth?scope=https%3A%2F%2Fwww.google.com%2Faccounts%2FOAuthLogin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&client_id=936475272427.apps.googleusercontent.com&device_name=hangups) in your browser.
1. Open [this URL](https://accounts.google.com/o/oauth2/programmatic_auth?scope=https%3A%2F%2Fwww.google.com%2Faccounts%2FOAuthLogin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&client_id=936475272427.apps.googleusercontent.com&device_name=hangups) in your browser.
2. Log into your Google account normally.
3. You should be redirected to a loading screen. Copy the `oauth_code` cookie value set by this page and paste it here.
3. You should be redirected to a loading screen that continues loading indefinitely.
To obtain the `oauth_code` cookie value, follow the steps below:
The authorization code is stored as `oauth_code` cookie value on this page. To obtain this value, continue with the steps below:
*Note:* If the `oauth_code` cookie is not showing in Chrome, try Firefox.
* Press F12 to open developer tools.
* Select the "Application" (Chrome) or "Storage" (Firefox) tab.
* In the sidebar, expand "Cookies" and select `https://accounts.google.com`
* In the cookie list, double click on the value for the `oauth_code` cookie to select it, and copy the value. This is the authorization code
4. Press F12 to open developer tools.
5. Select the "Application" (Chrome) or "Storage" (Firefox) tab.
6. In the sidebar, expand "Cookies" and select `https://accounts.google.com`
7. In the cookie list, double click on the value for the `oauth_code` cookie to select it, and copy the value (this is the authorization code).
<div class='note'>
You can't write messages to yourself or get notifications in a group, if "you" write the message. The best way is to create a new Google Chat account for this integration.<br>