0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

🐛 send correct token expiration time (#7547)

no issue

When using Ghost OAuth, exchanging the authorization code for an access token was returning a token along with an `expires_in` property containing a JavaScript date representation rather than the number of seconds the token is valid for. This was resulting in the client expecting it's access token to be valid until the year 48796(!) and so never attempting to refresh it's access_token.

- return token expiration time of 3600 seconds / 1hr
This commit is contained in:
Kevin Ansfield 2016-10-12 09:19:33 +01:00 committed by Katharina Irrgang
parent 50f383ef0b
commit 06151ef5ac

View file

@ -157,7 +157,7 @@ authentication = {
return {
access_token: localAccessToken,
refresh_token: localRefreshToken,
expires_in: accessExpires
expires_in: globalUtils.ONE_HOUR_S
};
});
},