Skip to content
This repository was archived by the owner on Nov 28, 2024. It is now read-only.

refreshAccessToken gets new refreshToken #22

@kevinsherman

Description

@kevinsherman

In src/client/resources/tokens.js there is a refreshAccessToken function. The function is intended to use an unexpired refreshToken to refresh an expired accessToken. In the function the parameter 'access_type' is being set to 'offline'. Per the documentation, "Set to offline to receive a refresh token on an authorization_code grant type request. Do not set to offline on a refresh_token grant type request."

My understanding is that this should only be set to offline when requesting the initial tokens (with the 'code' from the redirectURI).

When tested with 'offline' - this it returns both a refresh and access token.
When tested without 'offline' - this ONLY returns an access token (leaving the unexpired refreshToken still valid).

I will put together a PR for this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions