Skip to content

Commit

Permalink
Clarifications on refresh token method.
Browse files Browse the repository at this point in the history
  • Loading branch information
adriancable committed Sep 26, 2021
1 parent f521f9e commit 3dfebf4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Simply set `"access_token"` in your `config.json` file under the `"platform": "N

Google Accounts (mandatory for new Nest devices after August 2019, with an optional migration for earlier accounts) are fully supported.

There are two ways to authenticate with Google - the refresh token method, and the cookies method. Please try the refresh token method first, and if you have issues, then try the cookies method. We recommend the refresh token method because cookies tend to expire after a few months, requiring you to go through the authentication process again, whereas the refresh token lasts forever (unless you change your Google Account password).
There are two ways to authenticate with Google - the refresh token method, or the cookies method. Please try the refresh token method first, and if you have issues, then try the cookies method. We recommend the refresh token method because cookies tend to expire after a few months, requiring you to go through the authentication process again, whereas the refresh token lasts forever (unless you change your Google Account password).

# Using a Google Account - refresh token method

Expand All @@ -89,9 +89,11 @@ The `"refreshToken"` is a code provided by Google when you log into your account

Just run: `node login.js` and follow the instructions on the screen. You'll be prompted to navigate to a URL in your browser, log into Google, and copy and paste a code from your browser into the login tool. You'll then be provided with the `"refreshToken"` to add to `config.json`.

This comment has been minimized.

Copy link
@KMarefat

KMarefat Sep 26, 2021

A newbie question and perhaps in the wrong place, but where would I run "Just run: node login.js and follow the instructions on the screen."?


Refresh tokens for homebridge-nest are mutually compatible with homebridge-nest-cam: if you already have a refresh token that you use with homebridge-nest-cam, you can also use it with homebridge-nest, and vice versa.

# Using a Google Account - cookies method

Using the cookies method, Google Accounts are configured using the `"googleAuth"` object in `config.json`, which contains two fields, `"issueToken"` and `"cookies"`, which looks like this:
Using the cookies method (only recommended if you have problems with the refresh token method), Google Accounts are configured using the `"googleAuth"` object in `config.json`, which contains two fields, `"issueToken"` and `"cookies"`, which looks like this:

```
"platform": "Nest",
Expand Down

5 comments on commit 3dfebf4

@adriancable
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KMarefat - you run that command in whatever folder you installed the plug-in.

@KMarefat
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KMarefat - you run that command in whatever folder you installed the plug-in.
@adriancable The plugin is installed in a folder under docker. Docker running inside a NAS. is this a unix /DOS, etc. command?

@KMarefat
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KMarefat - you run that command in whatever folder you installed the plug-in.
@adriancable The plugin is installed in a folder under docker. Docker running inside a NAS. is this a unix /DOS, etc. command?
@adriancable The plugin is installed in a folder under docker. Docker running inside a NAS. is this a unix /DOS, etc. command?

@adriancable
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KMarefat - you would use exactly the same command on Linux, Windows, macOS, etc.

@KMarefat
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KMarefat - you would use exactly the same command on Linux, Windows, macOS, etc.

Thank You. this sounds like a Nodes command. I will look into it further. Thanks again.

Please sign in to comment.