I am trying to use devise for user authentication of my website. It uses an existing User table.
The table has username and password, however when I try to log in, I get the following error:
Completed 401 Unauthorized in 90ms.
Logs:
Started POST "/users/sign_in" for 127.0.0.1 at 2013-06-06 15:50:01 +0530
Processing by Devise::SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"+uKE28LrkWW71EHeasDSDCENQogAGODfBc3ZJJLyi9U=", "user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
User Load (0.1ms) SELECT `users`.* FROM `users` WHERE `users`.`email` = '[email protected]' LIMIT 1
Completed 401 Unauthorized in 90ms
Processing by Devise::SessionsController#new as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"+uKE28LrkWW71EHeasDSDCENQogAGODfBc3ZJJLyi9U=", "user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
Its solved! I changed the encryption key of the rails project in configs/initializers/devise.rb.
Rails version: 3.2.13 Devise version: 2.04
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With