diff --git a/app/controllers/devise_token_auth/omniauth_callbacks_controller.rb b/app/controllers/devise_token_auth/omniauth_callbacks_controller.rb index 6896e401d..f3564a04b 100644 --- a/app/controllers/devise_token_auth/omniauth_callbacks_controller.rb +++ b/app/controllers/devise_token_auth/omniauth_callbacks_controller.rb @@ -57,8 +57,10 @@ def omniauth_success extra_params = whitelisted_params @resource.assign_attributes(extra_params) if extra_params - # don't send confirmation email!!! - @resource.skip_confirmation! + if resource_class.devise_modules.include?(:confirmable) + # don't send confirmation email!!! + @resource.skip_confirmation! + end sign_in(:user, @resource, store: false, bypass: false)