Explorar el Código

Fix: #210 set tokens with `oauth2Client.credentials`

Yuki Takei hace 8 años
padre
commit
9c57084a62
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  1. 1 3
      lib/util/googleAuth.js

+ 1 - 3
lib/util/googleAuth.js

@@ -49,9 +49,7 @@ module.exports = function(config) {
         return callback(new Error('[googleAuth.handleCallback] Error to get token.'), null);
       }
 
-      oauth2Client.setCredentials({
-        access_token: tokens.access_token,
-      });
+      oauth2Client.credentials = tokens;
 
       var oauth2 = google.oauth2('v2');
       oauth2.userinfo.get({}, function(err, response) {