diff --git a/app/controllers/omniauth_controller.rb b/app/controllers/omniauth_controller.rb index e5ef58eb9..34f7347c7 100644 --- a/app/controllers/omniauth_controller.rb +++ b/app/controllers/omniauth_controller.rb @@ -17,7 +17,7 @@ class OmniauthController < ApplicationController if auth.present? # Find existing user by email email = auth['info']['email'] - user = User.find_by(email: email) + user = User.from_email(email) if user # Create authentication token (DeviseTokenAuth way)