Rails 3.2. Hi. Currently out app has an authentication system implemented that we did and we are going to migrate to devise. I am at wits end here trying to get the devise log in to work. Somehow I have drilled down the problem to the part where Devise actually creates a user session.
def create
self.resource = warden.authenticate!(auth_options)
set_flash_message(:notice, :signed_in) if is_flashing_format?
sign_in(resource_name, resource)
yield resource if block_given?
respond_with resource, location: after_sign_in_path_for(resource)
end
Routes (I have changed the devise controller and literally just pasted the Devise controller code to debug it with pry):
devise_for :users, controllers: { sessions: "sessions" }
The problem here is that warden is not even hitting the database with an authenticate
. It just returns nil
. I checked my other, simpler application and authenticate
's behavior scans the database, regardless if email/password is correct. How do I get Warden/Devise for that matter to actually do a select statement to check the database out?
(If there is anything I can paste to help you guys I'll paste it)