Commit d7ba7178 authored by Anton Smith's avatar Anton Smith Committed by Evan Read

GitLab OmniAuth provider - update code snippet for changing GitLab URL

parent 842e04e7
......@@ -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