manually refreshing a token
See original GitHub issueI’m having trouble refreshing tokens. I keep getting { [Error: internal_failure] code: 500 } for the error. The refreshToken I’m supplying is valid. I am setting the credentials before calling this method:
oAuth2Client.refreshAccessToken(function(err, tokens) {
console.log(err, tokens);
});
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Refresh Tokens - OAuth 2.0 Simplified
To use the refresh token, make a POST request to the service's token endpoint with grant_type=refresh_token , and include the refresh token as ......
Read more >Understanding Refresh Tokens
A refresh token can be requested by an application as part of the process of obtaining an access token. Many authorization servers implement...
Read more >Should access tokens be refreshed automatically or ...
Manually Refreshing User authenticates with username and password. The API sends back a short lived access token containing his data, and a ......
Read more >Refreshing a Token
Rotating refresh tokens reduces their attack surface because there is a chance that a stolen token will be unusable by the attacker. If...
Read more >Refresh Access Token | ReadyAPI Documentation
Process overview ; Automatic, Manual ; Refresh token exist, ReadyAPI automatically updates the access token using the refresh token. You need to click...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Greetings folks! There’s a great example of refreshing the access token here: https://github.com/google/google-auth-library-nodejs/blob/master/examples/refreshAccessToken.js
If you still have trouble, let us know!
@bcoe thanks for the response
My issue:
I would like to use the google photos API. For this I am using 1/ https://github.com/roopakv/google-photos + 2/ for the google authentication I am using this library (= https://github.com/googleapis/google-api-nodejs-client).
I don’t know how I can use 2/ to refresh the access token so that I can pass that to 1/. The problem with 2/ is that it is automatically refreshing the access token when using the google APIs provided by 2/ but I am not using any of the google APIs provided by 2/.
Note also that 2/ doesn’t provide the google photos API which is the only API I want to use !