Skip to content

Refresh GitLab tokens after they expire (migration phase 2)

Eric Eastwood requested to merge 2838-refresh-gitlab-tokens into develop

Refresh GitLab tokens after they expire

Part of #2838 (closed) which tracks GitLab 15.0 changes which includes all OAuth tokens getting expiry dates (previously never expired).

Dev notes

passport-oauth2

There is a library to access token refreshes, passport-oauth2-refresh but I don't think we need it. We just need to do one API request and there is a lot more fluff in that library.

Todo

  • Write migration script to run over the GitLab identities and migrate the identity.accessTokenSecret field (which we stored the refreshToken in for some reason previously) to identity.refreshToken
  • Merge minimal app code to write to the correct field and run migration script before these bigger app changes
Edited by Eric Eastwood

Merge request reports