Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAuthDispatcher expirationTimeSeconds cannot be automatically set #106

Open
carlonicora opened this issue Dec 20, 2022 · 0 comments
Open

Comments

@carlonicora
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant