This repository was archived by the owner on Jan 20, 2024. It is now read-only.

Description
Currently it's not possible to get token data, save it in persistent storage between application runs and then recover the token:
function ClientOAuth2Token (client, data) {
this.client = client
this.data = data
this.tokenType = data.token_type && data.token_type.toLowerCase()
this.accessToken = data.access_token
this.refreshToken = data.refresh_token
this.expiresIn(data.expires_in)
}
Constructor does not allow to pass data.expires.
Plus, this class does not handle expiration of refresh token.
Also, sign method should probably throw an error if user tries to sign with expired token.