Skip to content
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

chore: docs and samples for refresh token, update uris #215

Merged
merged 1 commit into from
Jan 3, 2018
Merged

chore: docs and samples for refresh token, update uris #215

merged 1 commit into from
Jan 3, 2018

Conversation

JustinBeckwith
Copy link
Contributor

Addresses #111

@JustinBeckwith JustinBeckwith requested review from ofrobots and a team December 22, 2017 07:26
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 22, 2017
console.log(`Refresh Token: ${oAuth2Client.credentials.refresh_token}`);
console.log(`Expiration: ${oAuth2Client.credentials.expiry_date}`);
console.log('Refreshing access token ...');
const res = await oAuth2Client.refreshAccessToken();

This comment was marked as spam.

This comment was marked as spam.

README.md Outdated
});
```

If a refresh_token is set again on `OAuth2Client.credentials.refresh_token`, you can cann `refreshAccessToken()`:

This comment was marked as spam.

This comment was marked as spam.

/**
* Recommended. Indicates whether your application can refresh access tokens
* when the user is not present at the browser. Valid parameter values are
* online, which is the default value, and offline. Set the value to offline

This comment was marked as spam.

This comment was marked as spam.

access_type?: string;

/**
* The response_type will always be set to CODE.

This comment was marked as spam.

This comment was marked as spam.

/**
* Required. The client ID for your application. You can find this value in
* the API Console.
*/

This comment was marked as spam.

This comment was marked as spam.

* Start by acquiring a pre-authenticated oAuth2 client.
*/
async function main() {
try {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.


/**
* The base endpoint for token retrieval.
*/
private static readonly GOOGLE_OAUTH2_TOKEN_URL_ =
'https://accounts.google.com/o/oauth2/token';
'https://www.googleapis.com/oauth2/v4/token';

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@JustinBeckwith
Copy link
Contributor Author

Note: This is a semver minor change (though it will be included in the 1.0 release). I have no reason to believe it breaks any functionality, but it does (I think) bring us up to date with the most recent documentation:
https://developers.google.com/identity/protocols/OAuth2InstalledApp

It's also suggested in #120 that this is causing problems for users as well. I will update the PR and commit message to call these both out.

Note: This is a semver minor change (though it will be included in the 1.0 release). I have no reason to believe it breaks any functionality, but it does (I think) bring us up to date with the most recent documentation:
https://developers.google.com/identity/protocols/OAuth2InstalledApp

It's also suggested in #120 that this is causing problems for users as well.
@JustinBeckwith JustinBeckwith merged commit 18bfdd9 into googleapis:next Jan 3, 2018
ofrobots pushed a commit that referenced this pull request Jan 9, 2018
Note: This is a semver minor change (though it will be included in the 1.0 release). I have no reason to believe it breaks any functionality, but it does (I think) bring us up to date with the most recent documentation:
https://developers.google.com/identity/protocols/OAuth2InstalledApp

It's also suggested in #120 that this is causing problems for users as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants