diff options
Diffstat (limited to 'app/controllers/omniauth_callbacks_controller.rb')
-rw-r--r-- | app/controllers/omniauth_callbacks_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb index f858a0e5cf7..eda72400f17 100644 --- a/app/controllers/omniauth_callbacks_controller.rb +++ b/app/controllers/omniauth_callbacks_controller.rb @@ -15,7 +15,11 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController feature_category :system_access def handle_omniauth - omniauth_flow(Gitlab::Auth::OAuth) + if ::AuthHelper.saml_providers.include?(oauth['provider'].to_sym) + saml + else + omniauth_flow(Gitlab::Auth::OAuth) + end end AuthHelper.providers_for_base_controller.each do |provider| |