## GitLab integration GitLab is a DevOps platform that provides source code management, CI/CD pipelines, issue tracking, and project management. Integrating GitLab with Frontegg allows your application to manage projects, issues, and merge requests on behalf of your users through OAuth 2.0 authentication. Prerequisites - A GitLab account with access to [User Settings](https://gitlab.com/-/user_settings/applications) ### Connect GitLab #### Step 1: Open the OAuth applications page Sign in to GitLab and navigate to **User Settings → Applications** at `https://gitlab.com/-/user_settings/applications`. This page lists all OAuth applications registered under your account. Click **Add new application**. ![GitLab User Settings Applications page](/assets/gitlab-1.eedf6827fb5731747865bd53dac3f593247db7f32dc39ae6fbd0e553944bef45.1ce25488.png) #### Step 2: Fill in the application details On the **Add new application** form, enter the following: | Field | Value | | --- | --- | | **Name** | A descriptive name, e.g., `Frontegg Integration` | | **Redirect URI** | The Frontegg callback URIs (see below) | | **Confidential** | Check this box for server-side applications | In the **Redirect URI** field, enter the callback URI: ``` https://YOUR_MCP_GATEWAY_URL/integration-callback ``` ![GitLab new application form](/assets/gitlab-2.730bab9f8b7659b91bac700198af12f1ca3c285a90d6267d37f7f2278deba42c.1ce25488.png) #### Step 3: Select OAuth scopes In the **Scopes** section, select the scopes required for your integration: | Scope | Description | | --- | --- | | `read_api` | Read-only API access to all groups, projects, and packages | | `read_user` | Read user profile information | | `read_repository` | Read-only access to repositories | | `write_repository` | Read-write access to repositories | Minimum required scopes For basic functionality, select at minimum: `read_api` and `read_user`. Click **Save application**. ![GitLab application form with scopes selected](/assets/gitlab-3.c850dd46a41a093b4d6b8486ac6494d3a577df579c53861309df6a514f3329a1.1ce25488.png) #### Step 4: Copy your credentials After saving, GitLab displays the **Application ID** (Client ID) and a **Secret** (Client Secret). Copy both values immediately and store them securely. Keep your credentials secure The Client Secret is shown only once. If you lose it, click **Renew secret** to generate a new one — this will invalidate the previous secret. ![GitLab application credentials](/assets/gitlab-4.d2b81ca18af90e6d72c721025fda6408840500ae957a05591b3d880c8bad9cd2.1ce25488.png) ### Configure the Frontegg portal Once you have the **Application ID** (Client ID) and **Secret** (Client Secret) from the steps above, enter them in the integration configuration page of the Frontegg portal: 1. Open the **Frontegg portal** and navigate to [ENVIRONMENT] → Integrations → GitLab. 2. Enter the **Client ID** and **Client Secret** in the corresponding fields. 3. Select the required **scopes**. 4. Click **Save**. ### Additional resources - [GitLab OAuth 2.0 documentation](https://docs.gitlab.com/ee/api/oauth2.html) - [GitLab User Settings Applications](https://gitlab.com/-/user_settings/applications) - [GitLab API documentation](https://docs.gitlab.com/ee/api/rest/) - [How to get your Redirect URL](/agen-for-work/connectors/redirect-url)