X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2b2264ddab13ee8ffa7e90d8b803d1a0296a7cff..4988801dc6c1175bde14b8001dbc91638c316f70:/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