Skip to content

OAuthDispatcher expirationTimeSeconds cannot be automatically set #106

@carlonicora

Description

@carlonicora

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions