Skip to content

OAuth providers

GitLab

Set up GitLab OAuth for repositories, merge requests, issues, and CI/CD

Connect your users to GitLab for repositories, merge requests, issues, and CI/CD.

PropertyValue
Provider IDgitlab
CategoryDeveloper Tools
PKCESupported (S256)
Token refreshAutomatic (rotating refresh tokens)
Redirect URIShown in Developer Portal

Open GitLab Applications

Navigate to User Settings > Applications (or a group/instance-level Applications page for shared apps) and sign in.

Add a new application

Click Add new application and enter a name.

Configure the redirect URI

Add the Alter callback URL (from the Developer Portal) to the Redirect URI field. Keep Confidential checked.

Select scopes

Select the scopes the application needs. See Available Scopes below.

Get credentials

Click Save application, then copy the Application ID (Client ID) and Secret (Client Secret). The secret is only shown once.

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add GitLab provider

Go to OAuth Providers > Add Provider > GitLab.

Enter credentials

  • Client ID: Paste your GitLab Application ID
  • Client Secret: Paste your GitLab Secret

Select scopes

Choose the scopes the application needs.

Save

Click Save. The provider is now active.

ScopeDescription
read_userRead-only access to the authenticated user’s profile
read_apiRead-only access to the API, including all groups and projects
apiFull read/write access to the API, including all groups and projects, the container registry, and the package registry
ScopeDescription
read_repositoryRead-only access to repositories via Git-over-HTTP
write_repositoryRead/write access to repositories via Git-over-HTTP
read_registryRead-only (pull) access to container registry images
write_registryRead/write (push) access to container registry images
read_virtual_registryRead-only access to images through the dependency proxy
write_virtual_registryRead/write access to images through the dependency proxy
ScopeDescription
create_runnerCreate runners
manage_runnerManage runners
k8s_proxyPerform Kubernetes API calls via the agent for Kubernetes
read_observabilityRead-only access to GitLab Observability
write_observabilityWrite access to GitLab Observability
ScopeDescription
ai_featuresAccess GitLab Duo AI features
ai_workflowsAccess GitLab Duo agent platform workflows
mcpAccess the GitLab Model Context Protocol (MCP) server
openidAuthenticate via OpenID Connect
profileRead-only profile data via OpenID Connect
emailRead-only primary email via OpenID Connect
ScopeDescription
sudoPerform API actions as any user (administrators only)
admin_modePerform API actions as an administrator with Admin Mode enabled (administrators only)
  • Prefer read_api plus narrower scopes over api when the integration is read-only — api grants full read/write access.
  • OAuth access tokens expire after 2 hours; the rotating refresh token keeps the grant alive without re-authorization.
  • See the GitLab OAuth documentation for more details.