mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-16 21:08:38 +08:00
Some checks failed
all-good: Did all the other checks pass? / all-good (push) Has been cancelled
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
DB migration compat / Check if migrations changed (push) Has been cancelled
Docker Server Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Server Build and Run / docker (push) Has been cancelled
Runs E2E API Tests (Local Emulator) / E2E Tests (Local Emulator, Node ${{ matrix.node-version }}) (22.x) (push) Has been cancelled
Runs E2E API Tests / E2E Tests (Node ${{ matrix.node-version }}, Freestyle ${{ matrix.freestyle-mode }}) (mock, 22.x) (push) Has been cancelled
Runs E2E API Tests / E2E Tests (Node ${{ matrix.node-version }}, Freestyle ${{ matrix.freestyle-mode }}) (prod, 22.x) (push) Has been cancelled
Runs E2E API Tests with custom port prefix / build (22.x) (push) Has been cancelled
Lint & build / lint_and_build (latest) (push) Has been cancelled
Dev Environment Test With Custom Base Port / restart-dev-and-test-with-custom-base-port (push) Has been cancelled
Dev Environment Test / restart-dev-and-test (push) Has been cancelled
Run setup tests with custom base port / setup-tests-with-custom-base-port (push) Has been cancelled
Run setup tests / setup-tests (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled
DB migration compat / Back-compat — Current branch migrations with ${{ needs.check-migrations-changed.outputs.base_branch }} branch code (push) Has been cancelled
DB migration compat / Forward-compat — Current branch code with ${{ needs.check-migrations-changed.outputs.base_branch }} branch migrations (push) Has been cancelled
DB migration compat / No migration changes (skipped) (push) Has been cancelled
36 lines
1.7 KiB
Plaintext
36 lines
1.7 KiB
Plaintext
---
|
|
title: "GitLab"
|
|
description: "Set up GitLab as an authentication provider with Stack Auth"
|
|
---
|
|
|
|
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
|
|
|
|
<Steps>
|
|
<Step title="Create a GitLab OAuth App">
|
|
1. Log in to your GitLab account.
|
|
2. In the top-right corner, click on your profile picture and select **Preferences**.
|
|
3. In the left sidebar, select **Applications** > **Add new application**.
|
|
4. 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` and `email` scopes
|
|
5. Click **Save application**.
|
|
6. GitLab will display your **Application ID** and **Secret**. Make note of these values as you'll need them for the next steps.
|
|
7. If you're using a self-hosted GitLab instance, you'll also need the URL of your GitLab instance.
|
|
</Step>
|
|
|
|
<Step title="Enable GitLab OAuth in Stack Auth">
|
|
1. On the Stack Auth dashboard, select **Auth Methods** in the left sidebar.
|
|
2. Click **Add SSO Providers** and select **GitLab** as the provider.
|
|
3. Set the **Application ID** and **Secret** you obtained from GitLab earlier.
|
|
4. 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.
|
|
</Step>
|
|
</Steps>
|
|
|
|
### Need More Help?
|
|
|
|
- Check the [GitLab OAuth 2.0 documentation](https://docs.gitlab.com/ee/api/oauth2.html)
|
|
- Join our [Discord](https://discord.stack-auth.com)
|