Skip to content

Improve createToken/refresh usage examples #182

Open
@caub

Description

In README code examples show:

const authResponse = await oauthClient.createToken(..); // or .refresh() or .refreshUsingToken(..)
console.log('Token is', authResponse.json)

Instead it should be:

await oauthClient.createToken(..); // or .refresh() or .refreshUsingToken(..)
console.log('Token is', oauthToken.token.getToken())

Reason is in 1st case createdAt is missing, and this is a big issue if you save that json without it

btw I think you should rather save only 1 field: expireAt field rather than 2: createdAt + expire_in

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