diff --git a/app/controllers/devise_token_auth/concerns/resource_finder.rb b/app/controllers/devise_token_auth/concerns/resource_finder.rb index 6d866bef9..4103ae090 100644 --- a/app/controllers/devise_token_auth/concerns/resource_finder.rb +++ b/app/controllers/devise_token_auth/concerns/resource_finder.rb @@ -15,7 +15,6 @@ def get_case_insensitive_field_from_resource_params(field) def find_resource(field, value) # fix for mysql default case insensitivity q = "#{field.to_s} = ? AND provider='#{provider.to_s}'" - if ActiveRecord::Base.connection.adapter_name.downcase.starts_with? 'mysql' q = "BINARY " + q end diff --git a/app/controllers/devise_token_auth/registrations_controller.rb b/app/controllers/devise_token_auth/registrations_controller.rb index 4bed83447..71ec10b9c 100644 --- a/app/controllers/devise_token_auth/registrations_controller.rb +++ b/app/controllers/devise_token_auth/registrations_controller.rb @@ -7,7 +7,7 @@ class RegistrationsController < DeviseTokenAuth::ApplicationController def create @resource = resource_class.new(sign_up_params) - @resource.provider = "email" + @resource.provider = provider # honor devise configuration for case_insensitive_keys if resource_class.case_insensitive_keys.include?(:email)