Draft: Add oauth to Web IDE
-
gitlab-web-ideSpike MR for OAuth- Part 1 - refactor: Add AuthType to support OAuth (!247 - merged)
- Part 2 - refactor: Set up OAuthClient and oauthCallback ... (!250 - merged)
- Pre-Part 3 - feat: Add utils-crypto package (!252 - merged)
- Part 3 - feat: Implementing OAuthClient (!251 - merged)
- In Parallel:
- Logging - chore: Add minLogLevel to config (!257 - closed)
- Secret Storage Provider - feat: Add secretStorageProvider to workbench op... (!263 - merged)
- Broadcasting - feat: Add broadcaster to OAuth (!264 - merged)
- Extra - chore: Add logger package (!248 - merged)
gitlabSpike MR
Description
This is the draft MR of adding oauth to the Web IDE. It will be split up into smaller MR's.
What all is going on here?
- Adds
Authentication Typefield to the example app which corresponds toauth.typein the main config. - Adds
oauth-clientpackage to manage initializing and refreshing the oauth token. - Adds
secretStorageProviderto the VSCode workbench options to expose theauth_headersto GitLab VSCode extensions. This can be accessed usingcontext.secrets.get('auth_headers'). - In the
gitlab-api-client, theauthHeadersoption is replaced with anauthProvider. TheauthProvideris called every time we need headers. If we're using oauth, this means we can choose to refresh if needed. - Adds a decorator for broadcasting oauth changes to other tabs.
How to test?
Follow the instructions in this documentation:
Screenshots
| Description | Screenshot |
|---|---|
| Demo | 20231001_web_ide_example_demo |
New Authentication Type field in example app config |
![]() |
| OAuth handshake screen in example app | ![]() |
Edited by Paul Slaughter

