From 27be157d70c3cf447c349c0ec8ec2e766c262328 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 25 Feb 2014 14:38:14 -0800 Subject: [PATCH] fix oauth early token expiry --- libraries/shared/src/OAuthAccessToken.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/shared/src/OAuthAccessToken.cpp b/libraries/shared/src/OAuthAccessToken.cpp index 522a3700cd..e65374fb73 100644 --- a/libraries/shared/src/OAuthAccessToken.cpp +++ b/libraries/shared/src/OAuthAccessToken.cpp @@ -7,6 +7,7 @@ // #include +#include #include "OAuthAccessToken.h" @@ -22,7 +23,7 @@ OAuthAccessToken::OAuthAccessToken() : OAuthAccessToken::OAuthAccessToken(const QJsonObject& jsonObject) : token(jsonObject["access_token"].toString()), refreshToken(jsonObject["refresh_token"].toString()), - expiryTimestamp(QDateTime::currentMSecsSinceEpoch() + jsonObject["expires_in"].toDouble()), + expiryTimestamp(QDateTime::currentMSecsSinceEpoch() + (jsonObject["expires_in"].toDouble() * 1000)), tokenType(jsonObject["token_type"].toString()) {