mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 05:52:51 +00:00
# Which Problems Are Solved naming inconsistencies: Configuration <-> Settings # How the Problems Are Solved # Additional Changes # Additional Context - Closes #11282
54 lines
2.0 KiB
Plaintext
54 lines
2.0 KiB
Plaintext
---
|
|
title: Log in with ZITADEL on Gitlab OmniAuth Provider
|
|
---
|
|
|
|
import CreateApp from "../application/_application.mdx";
|
|
|
|
This guide shows how to enable login with ZITADEL on self-hosted Gitlab instances.
|
|
|
|
It covers how to:
|
|
|
|
- create and configure the application in your ZITADEL project
|
|
- create and configure the connection in a self-hosted Gitlab instance
|
|
|
|
Prerequisites:
|
|
|
|
- existing ZITADEL Instance, if not present follow [this guide](/guides/start/quickstart)
|
|
- existing ZITADEL Organization, if not present follow [this guide](/guides/manage/console/organizations-overview)
|
|
- existing ZITADEL project, if not present follow the first 3 steps [here](/guides/manage/console/projects-overview)
|
|
- running Gitlab instance see [installation guide](https://docs.gitlab.com/ee/install/)
|
|
|
|
<CreateApp components={props.components} appType="web" authType="code" appName="Gitlab" redirectURI="https://<your_gitlab_url>/users/auth/openid_connect/callback"/>
|
|
|
|
## Gitlab settings
|
|
|
|
Follow [this guide](https://docs.gitlab.com/ee/administration/auth/oidc.html) of gitlab to configure the omniauth provider. Here are some example settings with redacted secrets.
|
|
|
|
Replace the values of the following fields:
|
|
|
|
- `args.client_options.identifier` with the `ClientId` generated by ZITADEL
|
|
- `args.client_options.secret` with the `ClientSecret` generated by ZITADEL
|
|
- `args.client_options.redirect_uri` with the proper URL to your gitlab instance and callback
|
|
|
|
```ruby
|
|
gitlab_rails['omniauth_providers'] = [
|
|
{
|
|
name: "openid_connect",
|
|
label: "ZITADEL",
|
|
icon: "https://${CUSTOM_DOMAIN}/ui/console/assets/icons/favicon-32x32.png",
|
|
args: {
|
|
name: "openid_connect",
|
|
scope: ["openid","profile","email"],
|
|
response_type: "code",
|
|
issuer: "https://${CUSTOM_DOMAIN}",
|
|
discovery: true,
|
|
client_options: {
|
|
identifier: "<CLIENT ID from ZITADEL>",
|
|
secret: "<CLIENT SECRET from ZITADEL>",
|
|
redirect_uri: "https://<YOUR_GITLAB_URL>/users/auth/openid_connect/callback"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
```
|