diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-11 03:10:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-11 03:10:19 +0300 |
commit | feb7a8f326e530cfce4d12e3badb56cd86ee3f3e (patch) | |
tree | b1d4d522a8592bc7b1cca48554f7bcc7710df28f /app/controllers/omniauth_callbacks_controller.rb | |
parent | 99bd45e7ce7539f3a0b7f7b710f1230464367b59 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/omniauth_callbacks_controller.rb')
-rw-r--r-- | app/controllers/omniauth_callbacks_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb index ac1d7ecc01c..5bd3b74af1f 100644 --- a/app/controllers/omniauth_callbacks_controller.rb +++ b/app/controllers/omniauth_callbacks_controller.rb @@ -186,7 +186,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController persist_accepted_terms_if_required(user) if new_user store_after_sign_up_path_for_user if intent_to_register? - sign_in_and_redirect(user, event: :authentication) + sign_in_and_redirect_or_confirm_identity(user, auth_user, new_user) end else fail_login(user) @@ -316,6 +316,11 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController def store_after_sign_up_path_for_user store_location_for(:user, users_sign_up_welcome_path) end + + # overridden in EE + def sign_in_and_redirect_or_confirm_identity(user, _, _) + sign_in_and_redirect(user, event: :authentication) + end end OmniauthCallbacksController.prepend_mod_with('OmniauthCallbacksController') |