Hello Everyone,
In the OAuthDispatcher, the expirationTimeSeconds can only be set calling the setExpiresInSeconds directly from an outside source.
Currently, to make Asana refresh the token through the refreshAccessToken (called from authenticate), the expiration must be set manually.
Would it be possible to pass the expiration time in the constructor as an additional option? This would allow the dispatcher to correctly refresh the token when needed?
This could be achieved by allowing an option and setting the expirationTimeSeconds in the constructor, similar to this
$this->expirationTimeSeconds = isset($options['expiration']) ? time() + $options['expiration'] : null;
If this is an acceptable solution, I would be happy to provide a pull request.