Skip to content

Implement OAuth token refreshing

Problem to solve

When we generate an access token using the OAuth flow (#560 (closed)), the token will expire (by default in 2 hours).

Proposal

Ask for a new token using the refresh_token https://docs.gitlab.com/ee/api/oauth2.html#authorization-code-with-proof-key-for-code-exchange-pkce.

Further details

We'll need to keep track of when the original token has been generated and refresh it when the extension want's to use it after its expiration time.

Links / references