X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2b2264ddab13ee8ffa7e90d8b803d1a0296a7cff..acfbc091982fbf74baeef7d16ff7d84f63c84951:/lib/auth.rb diff --git a/lib/auth.rb b/lib/auth.rb index 636173928..434994329 100644 --- a/lib/auth.rb +++ b/lib/auth.rb @@ -1,6 +1,9 @@ module Auth - PROVIDERS = { "None" => "", "OpenID" => "openid" } - PROVIDERS["Google"] = "google" if defined?(GOOGLE_AUTH_ID) - PROVIDERS["Facebook"] = "facebook" if defined?(FACEBOOK_AUTH_ID) - PROVIDERS["Windows Live"] = "windowslive" if defined?(WINDOWSLIVE_AUTH_ID) + PROVIDERS = { "None" => "", "OpenID" => "openid" }.tap do |providers| + providers["Google"] = "google" if defined?(GOOGLE_AUTH_ID) + providers["Facebook"] = "facebook" if defined?(FACEBOOK_AUTH_ID) + providers["Windows Live"] = "windowslive" if defined?(WINDOWSLIVE_AUTH_ID) + providers["GitHub"] = "github" if defined?(GITHUB_AUTH_ID) + providers["Wikipedia"] = "wikipedia" if defined?(WIKIPEDIA_AUTH_ID) + end.freeze end