Skip to content

Instantly share code, notes, and snippets.

@kidig kidig/gitlab.rb
Created Sep 25, 2018

Embed
What would you like to do?
Gitlab Yandex.OAuth Single Sign-On
gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_allow_single_sign_on'] = ['Yandex']
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['omniauth_providers'] = [
{
"name" => "oauth2_generic",
"app_id" => "your-app-id",
"app_secret" => "your-app-secret",
"args" => {
client_options: {
"site" => "https://oauth.yandex.ru",
"authorize_url" => "/authorize",
"token_url" => "/token",
"user_info_url" => "https://login.yandex.ru/info",
},
user_response_structure: {
attributes: {
name: 'login',
email: 'default_email',
first_name: 'first_name',
last_name: 'last_name'
}
},
redirect_url: 'http://your-gitlab-host/users/auth/Yandex/callback',
name: 'Yandex',
strategy_class: "OmniAuth::Strategies::OAuth2Generic"
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.