Commit 55420e5f authored by Evan Read's avatar Evan Read

Merge branch 'docs/access-gitlab-provider-custom-url' into 'master'

GitLab OmniAuth provider - update code snippet for changing GitLab URL

See merge request gitlab-org/gitlab!66684
parents 116ae45e d7ba7178
......@@ -48,7 +48,7 @@ GitLab.com generates an application ID and secret key for you to use.
1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for initial settings.
1. Add the provider configuration:
For Omnibus installations:
For Omnibus installations authenticating against **GitLab.com**:
```ruby
gitlab_rails['omniauth_providers'] = [
......@@ -61,7 +61,20 @@ GitLab.com generates an application ID and secret key for you to use.
]
```
For installations from source:
Or, for Omnibus installations authenticating against a different GitLab instance:
```ruby
gitlab_rails['omniauth_providers'] = [
{
"name" => "gitlab",
"app_id" => "YOUR_APP_ID",
"app_secret" => "YOUR_APP_SECRET",
"args" => { "scope" => "api", "client_options" => { "site" => "https://gitlab.example.com/api/v4" } }
}
]
```
For installations from source authenticating against **GitLab.com**:
```yaml
- { name: 'gitlab',
......@@ -70,6 +83,15 @@ GitLab.com generates an application ID and secret key for you to use.
args: { scope: 'api' } }
```
Or, for installations from source to authenticate against a different GitLab instance:
```yaml
- { name: 'gitlab',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET',
args: { scope: 'api', "client_options": { "site": 'https://gitlab.example.com/api/v4' } }
```
1. Change `'YOUR_APP_ID'` to the Application ID from the GitLab.com application page.
1. Change `'YOUR_APP_SECRET'` to the secret from the GitLab.com application page.
1. Save the configuration file.
......
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