summaryrefslogtreecommitdiff
path: root/lib/gitlab/auth/o_auth/provider.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/auth/o_auth/provider.rb')
-rw-r--r--lib/gitlab/auth/o_auth/provider.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/gitlab/auth/o_auth/provider.rb b/lib/gitlab/auth/o_auth/provider.rb
index 1a25ed10d81..2ce8677c8b7 100644
--- a/lib/gitlab/auth/o_auth/provider.rb
+++ b/lib/gitlab/auth/o_auth/provider.rb
@@ -5,14 +5,14 @@ module Gitlab
module OAuth
class Provider
LABELS = {
- "alicloud" => "AliCloud",
- "dingtalk" => "DingTalk",
- "github" => "GitHub",
- "gitlab" => "GitLab.com",
- "google_oauth2" => "Google",
- "azure_oauth2" => "Azure AD",
+ "alicloud" => "AliCloud",
+ "dingtalk" => "DingTalk",
+ "github" => "GitHub",
+ "gitlab" => "GitLab.com",
+ "google_oauth2" => "Google",
+ "azure_oauth2" => "Azure AD",
"azure_activedirectory_v2" => "Azure AD v2",
- 'atlassian_oauth2' => 'Atlassian'
+ 'atlassian_oauth2' => 'Atlassian'
}.freeze
def self.authentication(user, provider)
@@ -68,7 +68,9 @@ module Gitlab
nil
end
else
- provider = Gitlab.config.omniauth.providers.find { |provider| provider.name == name }
+ provider = Gitlab.config.omniauth.providers.find do |provider|
+ provider.name == name || (provider.name == 'openid_connect' && provider.args.name == name)
+ end
merge_provider_args_with_defaults!(provider)
provider