How I can use google_oauth2 twice in the config? I need to authorize two google APIs. It’s possible?
Can I use this provider again? ( how)
Here is the document we followed:
https://docs.gitlab.com/ce/integration/omniauth.html#initial-omniauth-configuration
Here is the gitlab.rb settings on our server:
gitlab_rails['omniauth_auto_sign_in_with_provider'] = 'google_oauth2'
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['omniauth_auto_link_ldap_user'] = false
# gitlab_rails['omniauth_auto_link_saml_user'] = false
gitlab_rails['omniauth_external_providers'] = ['google_oauth2']
gitlab_rails['omniauth_providers'] = [
{
"name" => "google_oauth2",
"label" => "Domain1",
"app_id" => "(Google App ID)",
"app_secret" => "(Google App Secret",
"args" => { "access_type" => "offline", "approval_prompt" => "" }
},
{
"name" => "google_oauth2",
"label" => "Domain2",
"app_id" => "(Google App ID2)",
"app_secret" => "(Google App Secret2)",
"args" => { "access_type" => "offline", "approval_prompt" => "" }
}
]
Or maybe I should use oauth2 proxy or smth like that?
Thanks in advance.