diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-07-02 11:46:24 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-07-02 11:46:24 +0300 |
commit | 3b8b38fb0f6e8e6f73ac39c96a9338c5fc875f6f (patch) | |
tree | a8598ee32076663964f66463425dafe2ee1f464d /config | |
parent | 17a38b5a8b722db6f7ebf1c6eb801c63ad371880 (diff) |
If `omniauth_auto_sign_in_with_provider` is set,
it also means we're using omniauth, so we need to set it up.
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/devise.rb | 2 | ||||
-rw-r--r-- | config/initializers/omniauth.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index d051b699102..e5772c33307 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -219,7 +219,7 @@ Devise.setup do |config| end end - if Gitlab.config.omniauth.enabled + if Gitlab::OmniauthInitializer.enabled? Gitlab::OmniauthInitializer.new(config).execute(Gitlab.config.omniauth.providers) end end diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb index a7fa926a853..c558eb28ced 100644 --- a/config/initializers/omniauth.rb +++ b/config/initializers/omniauth.rb @@ -17,7 +17,7 @@ OmniAuth.config.before_request_phase do |env| Gitlab::RequestForgeryProtection.call(env) end -if Gitlab.config.omniauth.enabled +if Gitlab::OmniauthInitializer.enabled? provider_names = Gitlab.config.omniauth.providers.map(&:name) Gitlab::Auth.omniauth_setup_providers(provider_names) end |