GitLab OAuth Setup

Prev Next

You can let users sign in to your Rocket.Chat workspace using their GitLab credentials.

Prerequisites

Before you begin, make sure you have:

  • A GitLab application.

  • Your Application ID and Secret.

    • If you don’t already have a GitLab app, go to GitLab Applications.

    • Fill in the required details, select the scopes, and save your app.

    • Once created, GitLab will display the Application ID and Secret. Copy them, you’ll need them for configuring GitLab settings in your Rocket.Chat workspace..

Configure GitLab OAuth

Once you have your GitLab application credentials, configure GitLab OAuth in Rocket.Chat:

  1. In your Rocket.Chat workspace, go to Administration > Workspace > Settings > OAuth and expand the GitLab section.

  2. Toggle OAuth Enabled to on.

  3. Enter the following values:

    • GitLab URL: If you are using self-hosted GitLab, enter your instance URL. By default, this is https://gitlab.com.

    • GitLab Id: Paste the Application ID from your GitLab app.

    • Client Secret: Paste the Secret from your GitLab app.

    • Identity Path: Default is /api/v4/user. Leave this unless you need a custom path.

    • (Optional) Merge Users: Toggle on if you want to merge users with the same email address.

  4. Verify that the GitLab Callback URL matches the one you entered in your GitLab app settings.

  5. Click Save changes.

After saving, a Sign in with GitLab button will appear on your workspace login page. Users can now log in with their GitLab accounts.