Skip to content
Snippets Groups Projects
Commit 98dcad27 authored by Douwe Maan's avatar Douwe Maan
Browse files

Use proper labels for OAuth providers

parent 4773d98e
No related branches found
No related tags found
No related merge requests found
module Gitlab
module OAuth
class Provider
LABELS = {
"github" => "GitHub",
"gitlab" => "GitLab.com",
"google_oauth2" => "Google"
}.freeze
def self.providers
Devise.omniauth_providers
end
Loading
Loading
@@ -23,8 +29,9 @@ module Gitlab
end
 
def self.label_for(name)
name = name.to_s
config = config_for(name)
(config && config['label']) || name.to_s.titleize
(config && config['label']) || LABELS[name] || name.titleize
end
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment