3

According to the test suite the callback function passed to revokeCredentials gets a result object if the operation was successful which should contain a success property. However, when I use this snippet:

oauth2client.revokeCredentials(function (error, result) {
  if (error || !result.success) {
    console.error('Failed to revoke credentials!');
    console.error(error || result);
  } else {
    //...
  }
});

I get: TypeError: Cannot read property 'success' of undefined - am I missing something?

Copied from issue #445

JaKXz
  • 1,665
  • 1
  • 14
  • 34
  • I also have a tangentially related question: if you have the refresh token, do you have to have a valid access token to call `revokeCredentials`? It seems like overkill to me to have to call `refreshAccessToken` before calling this just to be sure... – JaKXz Jun 25 '15 at 18:07
  • I run into this issue too :( – ecbrodie Jul 17 '17 at 19:36

0 Answers0