GitLab
This guide explains how to set up GitLab as an authentication provider with Stack Auth. GitLab OAuth allows users to sign in to your application using their GitLab account.
Integration Steps
Create a GitLab OAuth App
- Log in to your GitLab account.
- In the top-right corner, click on your profile picture and select Preferences.
- In the left sidebar, select Applications > Add new application.
- Fill out the form with the following details:
- Name: Choose a name for your application
- Redirect URI: Enter
https://api.stack-auth.com/api/v1/auth/oauth/callback/gitlab
- Scopes: Select at minimum the
profile
andemail
scopes
- Click Save application.
- GitLab will display your Application ID and Secret. Make note of these values as you'll need them for the next steps.
- If you're using a self-hosted GitLab instance, you'll also need the URL of your GitLab instance.
Enable GitLab OAuth in Stack Auth
- On the Stack Auth dashboard, select Auth Methods in the left sidebar.
- Click Add SSO Providers and select GitLab as the provider.
- Set the Application ID and Secret you obtained from GitLab earlier.
- If you're using a self-hosted GitLab instance, you'll also need to provide the URL for your instance. For gitlab.com, you can leave this field blank or use the default value.
Need More Help?
- Check the GitLab OAuth 2.0 documentation
- Join our Discord