# Connecting GitLab login

To let your users sign up with their GitLab accounts, you need to register your service with GitLab and get an Application ID and Secret.

This page walks you through getting the Application ID and Secret. To enter the two values in WEEGLOO, see [Enter the Application ID and Secret in WEEGLOO](#back-to-weegloo).

## Get the Application ID and Secret from GitLab {#get-credentials}

Sign in to GitLab, then follow the two steps below in order. None of this costs anything.

::step-overview

::::step{title="Register an application" id="register-application"}
1. Open the Applications screen (<https://gitlab.com/-/user_settings/applications>).
2. Click **Add new application**.

   ![The Applications screen. It has the Your applications and Authorized applications sections, the list is empty, and the Add new application button is at the top right](/_img/en-US/manual/service-users/service-login/images/gitlab-01-applications.webp)

3. In **Name**, enter a name for this application (for example, `Cozy Closet`).
4. Paste the address below into the **Redirect URI** field. Select your *Space* to insert its *Space* ID into the address.

   ```weegloo-redirect-uri
   {
     "template": "https://auth.weegloo.com/v1/spaces/{spaceId}/login/oauth2/code/{provider}",
     "provider": "gitlab"
   }
   ```

   :::note
   If you're not sure which *Space* is yours and you've left the integration to an AI agent, you can also ask the agent. Ask in the chat, "Tell me the redirect address to register for GitLab login", and you'll get the complete address.
   :::

   :::note
   **Confidential**, below it, is checked from the start. Leave it checked, because WEEGLOO receives and stores the Secret.
   :::

   ![The Add new application form. Name holds "Cozy Closet", Redirect URI holds the WEEGLOO address, and the Confidential checkbox below is checked](/_img/en-US/manual/service-users/service-login/images/gitlab-02-register-form.webp)

5. Under **Scopes**, select only `read_user`. You must select at least one scope before you can save.

   ![The Scopes list. api and read_api are unchecked, and only read_user is checked](/_img/en-US/manual/service-users/service-login/images/gitlab-03-scopes.webp)

6. Click **Save application** at the very bottom of the form.
::::

::::step{title="Copy the Application ID and Secret" id="copy-credentials"}
When you click **Save application**, the screen for your new application opens. The Application ID and Secret you'll enter in WEEGLOO are on this screen.

:::note{variant="warning" title="You can see the Secret only now"}
The **Application ID** stays on this screen, so you can see it again anytime, but the **Secret** doesn't. If you lose the Secret, create a new one with **Renew secret**, then enter the new value in WEEGLOO again. The Secret is confidential, so don't share it with anyone or write it down anywhere public.
:::

1. Click the copy icon to the right of **Application ID** to copy its value.
2. Click the copy icon to the right of **Secret** to copy its value.

   ![The Application ID value, the hidden Secret, the Renew secret button next to it, and a notice that the Secret can be seen only now](/_img/en-US/manual/service-users/service-login/images/gitlab-04-credentials.webp)
::::

## Enter the Application ID and Secret in WEEGLOO {#back-to-weegloo}

You now have the Application ID and Secret. What you do next depends on how you've been working so far.

If you've been setting things up yourself in Content Studio, follow these steps.

1. Go back to [Turn on social login](/manual/service-users/service-login.md#turn-on-social-login).
2. In **Login Providers**, click the **Enable** button on the **GitLab** row.
3. In the **Enter in Weegloo** step, enter the Application ID in the **Application ID** field.
4. Enter the Secret in the **Secret** field.
5. Click the **Save** button below the expanded instructions.
6. If you're turning on *ServiceLogin* for the first time, also click the **Save** button at the very bottom of the form. Clicking this button is what saves your values and turns on *ServiceLogin*.

If you're adding a provider to a *ServiceLogin* that's already on, you only need to click **Save** below the expanded instructions ([Turn on another social login](/manual/service-users/service-login.md#add-a-provider)).

If you've left the integration to an AI agent and it asked you to get the Application ID and Secret, paste both values into the chat as they are and carry on with what you were doing. The agent handles the rest of the setup from there.

## What to do next {#what-to-do-next}

- [Turn on ServiceLogin](/manual/service-users/service-login.md#turn-on-servicelogin): Covers the steps for entering these values in Content Studio and finishing the rest of the member login setup.
- [Service member login](/getting-started/core-concepts/service-users/service-login.md): Covers, with diagrams, what member login is and the flow up to accepting your first members.
- [Create a member role](/manual/service-users/service-user-role.md#create-a-member-role): Covers creating the *ServiceUserRole* that decides what signed-up members can read and write.
- [Auth API](/api/reference/auth-api.md): Covers technical specs, such as request formats, that you need to add login to your site's code.
