diff --git a/lib/common/connection.js b/lib/common/connection.js index 41470241cbae..7244a286b38f 100644 --- a/lib/common/connection.js +++ b/lib/common/connection.js @@ -165,7 +165,7 @@ Connection.prototype.fetchToken = function(callback) { callback(err); return; } - var exp = new Date(body.token_expires * 1000); + var exp = new Date(Date.now() + body.expires_in * 1000); callback(null, new Token(body.access_token, exp)); }); return;