Permalink
Browse files

Issue #19299 change expired in to seconds.

  • Loading branch information...
1 parent d59e26f commit 7c7abddcf0a8dbec00248e4731155a50a7dfc38d @bendiy bendiy committed Mar 7, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 node-datasource/oauth2/oauth2.js
@@ -91,7 +91,8 @@ server.exchange(oauth2orize.exchange.code(function (client, code, redirectURI, d
var params = {};
params.token_type = model.get("tokenType");
- params.expires_in = new Date() - expires;
+ // Google sends time tell expires instead of just the time it expires at, so...
+ params.expires_in = (new Date() - expires) / 1000; // Seconds until the token expires.
// Send the tokens along.
return done(null, model.get("accessToken"), model.get("refreshToken"), params);

0 comments on commit 7c7abdd

Please sign in to comment.