openstreetmap-website/lib/auth.rb
Andy Allan d102c9aaf4 Move all settings to settings.yml
We leave the STATUS setting alone, since it's required before rails
boots. The test-specific settings now live in config/settings/test.yml
2019-03-13 18:06:23 +01:00

9 lines
477 B
Ruby

module Auth
PROVIDERS = { "None" => "", "OpenID" => "openid" }.tap do |providers|
providers["Google"] = "google" if Settings.key?(:google_auth_id)
providers["Facebook"] = "facebook" if Settings.key?(:facebook_auth_id)
providers["Windows Live"] = "windowslive" if Settings.key?(:windowslive_auth_id)
providers["GitHub"] = "github" if Settings.key?(:github_auth_id)
providers["Wikipedia"] = "wikipedia" if Settings.key?(:wikipedia_auth_id)
end.freeze
end