Skip to content

getNewAccessTokenUsingRefreshToken(refreshToken, params, callback) doc and signature are slightly misleading #197

@charlesread

Description

@charlesread

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

The documentation for this method (https://github.com/fastify/fastify-oauth2/blob/master/README.md?plain=1#L230) gives the impression that refreshToken is a string that is the actual refresh token ("eyJhbGciOiJSUzI1NiI...").

Howerver, refreshToken gets passed to simple-oauth2's .createToken() method, which expects an AccessToken object, itself with a refresh_token property, that can be successfully used.

.getNewAccessTokenUsingRefreshToken({refresh_token: 'eyJhbGciOiJSUzI1NiI...'}) works just fine.

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