Skip to content

Implement OAuth token refresh #49

@TsvetomirIvanov

Description

@TsvetomirIvanov

Add possibility to refresh existing OAuth token as access tokens have a limited duration.

Currently, I use a manual request that looks like this:

let rsp = await Wappsto.request.get(`/oauth_connect/${token_name}?refresh_token=true&verbose=updated`);

In case of rsp.status === 200, the token was successfully refreshed and I will note down the update time rsp.data.meta.updated, so I can calculate when is the next refresh due.

Note that you will need verbose=updated when obtaining an OAuth token, in order to know whether it is expired or not, upon retrieval.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions