> ## Documentation Index
> Fetch the complete documentation index at: https://docs.magic.link/llms.txt
> Use this file to discover all available pages before exploring further.

# GitLab Social Login with Magic

> You can allow your users to sign up & login into your web application with their GitLab account.

## Usage

### Prerequisites

* You will need a [GitLab](https://gitlab.com/) account
* You will need to have the [Magic SDK installed](/embedded-wallets/sdk/overview) into your web app
* You will need to have the [Magic SDK - OAuth Extension](/embedded-wallets/authentication/login/oauth/oauth-implementation) installed into your web app

### GitLab Setup

After installing the OAuth extension, you can now enable GitLab Login for your Magic app:

1. Go to your [Magic Dashboard](https://dashboard.magic.link/login)

2. Select the Magic app for which you’d like to enable GitLab Login, or create a new app

3. Navigate to **Social Login** from the sidebar

4. Click the toggle for **GitLab**

5. Go to GitLab App Dashboard

6. On the left sidebar, select your avatar

7. Select **Edit Profile**

8. On the left sidebar, select **Applications**

9. Select **Add new application**

10. In the application form, enter a **Name** (arbitrary), and add your **Redirect URI**:

    Add the **Redirect URI** you are passing as the **redirectURI** argument to the **loginWithRedirect** method:

    ```javascript JavaScript icon="square-js" theme={null}
    await magic.oauth2.loginWithRedirect({
      provider: 'gitlab',
      redirectURI: 'https://your-app.com/your/oauth/callback', // whitelist this with GitLab
    });
    ```

11. Make sure to tick **openid**, **profile**, **email** in the Scopes

<Frame>
  <img src="https://mintcdn.com/magic-newton/mA7B4icGsHcK07ZQ/images/scopes.webp?fit=max&auto=format&n=mA7B4icGsHcK07ZQ&q=85&s=df7fefc5459b6d33033d9b3493783264" alt="GitLab application form showing openid, profile, and email scope checkboxes" width="992" height="168" data-path="images/scopes.webp" />
</Frame>

12. Click **Save application** to save your GitLab app
13. You will be provided with the **Application ID** and **Secret**
14. Return to your Magic Dashboard and input the **Application ID** and **Secret** for your GitLab OAuth app
15. In Magic Dashboard, click **Save**

## Resources

* [GitLab Social Login Demo](https://magic-oauth-v2-dun.vercel.app)
