Skip to content

Support for auth flow for apps (get temporary_authorization_code, access_token, refresh_token) #53

Open
@picsoung

Description

@picsoung

Description

Handling the refresh token mechanism could be cumbersome. Let's simplify it for developers.

Context

Developers are free to decide when access tokens issued for their apps will expire. The default is 7 days.
On the OAuth payload, we send back an expires_in property to tell when the token expires. This is a timestamp.
We also send back a refresh_token that needs to be used to request a new token.

Possible Solution

two functions, one to check if there is a need to renew token, and one to renew it.

client.needToRefreshToken(expires_in)
client.refreshToken(refresh_token)

##Questions
Should we rewrite the Client object to store also the client id and client secret details about an app?
What should be the interface for those functions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions