Retrieve expires_in
when new access token is fetched automatically from refresh token
#125
Labels
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
The callback option #110 added is great, but it only provides the access token. But I'd also like to know when the access token is going to expire. Why not pass the entire access token response to the callback? I am updating my persistent store with the new access token, but need to know when it expires so that the refresh token (already stored) can be used if necessary. And assuming an hour expiration isn't safe.
I suggest changing AuthTokenMiddleware.php#L163 to:
That way in the callback you can access
$auth_tokens['access_token']
and$auth_tokens['expires_in']
.If we need to make this change backwards compatible, we could always do this for now:
Please and thank you! :)
The text was updated successfully, but these errors were encountered: