From b0802cb46a788900a293733fd4197e1cdbb1dc45 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Tue, 4 Dec 2018 08:20:37 +0500 Subject: [PATCH] Confirm user from OmniAuth --- app/controllers/users/omniauth_callbacks_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/users/omniauth_callbacks_controller.rb b/app/controllers/users/omniauth_callbacks_controller.rb index 633df14..af6911e 100644 --- a/app/controllers/users/omniauth_callbacks_controller.rb +++ b/app/controllers/users/omniauth_callbacks_controller.rb @@ -20,6 +20,7 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController user = User.where(email: auth.info.email).first_or_create! do |new_user| new_user.password = Devise.friendly_token[0, 20] + new_user.confirmed_at = Time.zone.now end UserOmniauth.where(