Commit f13bd70a authored by Shuang Zhang's avatar Shuang Zhang Committed by Kati Paizee

Doc: Let OmniAuth support DingTalk

parent c26bf815
---
stage: Ecosystem
group: Integrations
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
# DingTalk OAuth 2.0 OmniAuth provider **(FREE SELF)**
You can sign in to GitLab using your DingTalk account.
Sign in to DingTalk Open Platform and create an application on it. DingTalk generates a client ID and secret key for you to use.
1. Sign in to [DingTalk Open Platform](https://open-dev.dingtalk.com/).
1. On the top bar, select **Application development > Enterprise internal development** and then select **Create Application**.
![DingTalk menu](img/ding_talk_menu.png)
1. Fill in the application details:
- **Application Name**: This can be anything. Consider something like `<Organization>'s GitLab`, or `<Your Name>'s GitLab`, or something else descriptive.
- **Application Description**: Create a description.
- **Application icon**: Upload qualified icons if needed.
![DingTalk create application](img/ding_talk_create_application.png)
1. Select **Confirm and create**.
1. On the left sidebar, select **DingTalk Application** and find your application. Select it and go to the application information page.
![DingTalk your application](img/ding_talk_your_application.png)
1. Under the **Application Credentials** section, there should be an AppKey and AppSecret (see the screenshot). Keep this page open as you continue the configuration.
![DingTalk credentials](img/ding_talk_credentials.png)
1. On your GitLab server, open the configuration file.
For Omnibus package:
```shell
sudo editor /etc/gitlab/gitlab.rb
```
For installations from source:
```shell
cd /home/git/gitlab
sudo -u git -H editor config/gitlab.yml
```
1. See [Configure initial settings](omniauth.md#configure-initial-settings) for initial settings.
1. Add the provider configuration:
For Omnibus package:
```ruby
gitlab_rails['omniauth_providers'] = [
{
"name" => "ding_talk",
"app_id" => "YOUR_APP_ID",
"app_secret" => "YOUR_APP_SECRET"
}
]
```
For installations from source:
```yaml
- { name: 'ding_talk',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET' }
```
1. Change `YOUR_APP_ID` to the AppKey from the application information page in step 6.
1. Change `YOUR_APP_SECRET` to the AppSecret from the application information page in step 6.
1. Save the configuration file.
1. [Reconfigure](../administration/restart_gitlab.md#omnibus-gitlab-reconfigure) or [restart GitLab](../administration/restart_gitlab.md#installations-from-source) for the changes to take effect if you installed GitLab via Omnibus or from source respectively.
......@@ -28,6 +28,7 @@ GitLab supports the following OmniAuth providers.
| [Azure v1](azure.md) | `azure_oauth2` |
| [Bitbucket Cloud](bitbucket.md) | `bitbucket` |
| [CAS](cas.md) | `cas3` |
| [DingTalk](ding_talk.md) | `ding_talk` |
| [Facebook](facebook.md) | `facebook` |
| [Generic OAuth 2.0](oauth2_generic.md) | `oauth2_generic` |
| [GitHub](github.md) | `github` |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment