feat: Support OAuth logins for GitLab Self-Managed and GitLab Dedicated
Description
Introduce a new Authentication configuration section including a setting for OAuth Client IDs by instance URL.
Note that this MR only prompts the user to sign-in with OAuth if an application has already been configured in their VS Code workspace/user settings.
Related Issues
- Fix [VS Code] Give self-managed users the option to... (gitlab#551892)
- Partially addresses [VS Code] Add new OAuth client ID extension set... (gitlab#551894).
How has this been tested?
- Checkout this branch.
- Open this project in VS Code.
- Start the extension development host from VS Code's run and debug menu.
- Clone a project from https://staging.gitlab.com.
- Open the project cloned from staging in the VS Code extension development host.
- Configure your user settings JSON to include the following configuration:
"gitlab.authentication.oauthClientIds": { "https://staging.gitlab.com": "1c4e0476c610fbc5a5cccfde2e9ed611b732cace3a0cbdf5bc1f46a1c5925ead" },
- Use the
>Authenticate
to GitLab command. - Use https://staging.gitlab.com as the instance URL.
- Observe the fact that OAuth flow is supported!
🎉
-
If src/browser
orsrc/common
has been modified, please consider interoperability with the Web IDE. See Running the Extension in WebIDE. -
Consider an end-to-end test for significant new features that aren't covered by integration tests.
Screenshots (if appropriate)
Screen_Recording_2025-08-07_at_21.12.33
What CHANGELOG entry will this MR create?
-
fix:
Bug fix fixes - a user-facing issue in production - included in changelog -
feature:
New feature - a user-facing change which adds functionality - included in changelog -
BREAKING CHANGE:
(fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog -
None - other non-user-facing changes
Edited by Erran Carey