Skip to content

refactor: Add AuthType to support OAuth

Description

  • Right now we just refactor gitlabToken to this new type
  • Should only effect the example app since the main app doesn't pass along gitlabToken
  • !240 (closed)

This MR updates the following packages:

  • web-ide-types now has an auth: AuthConfig property instead of gitlabToken: string
  • gitlab-api-client classes now accept an auth: AuthProvider instead of just gitlabToken: string
  • vscode-mediator-commands now receives an auth: AuthProvider in it's factory function which it will pass to the client it creates
  • vscode-bootstrap needs to convert the AuthConfig it receives from ClientOnlyConfig into an AuthProvider and give it to the mediator command facotry
  • example needs to use the new auth: AuthConfig property instead of gitlabToken: string

Screenshot

PLEASE NOTE: There's currently a bug on main with the example app. You'll need to apply this MR !245 (merged) for it to work.

curl https://gitlab.com/gitlab-org/gitlab-web-ide/-/merge_requests/245.diff | git apply

Here's a demo of authentication working as expected through the example app:

20231010_ide_oauth_part_1_demo

Edited by Paul Slaughter

Merge request reports

Loading