Answer the question
In order to leave comments, you need to log in
Why is Devise not authorizing the user?
Rails 4, Devise 3, according to the guide https://github.com/plataformatec/devise/wiki/How-T... set authorization by username. Added a boolean admin attribute to the user.
I register the user, I log in - all is good.
The next day I return to work on the application, I try to log in - and I get
Started POST "/users/sign_in" for 127.0.0.1 at 2014-09-27 20:33:59 +0700
Processing by Devise::SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "user"=>{"login"=>"Frey", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Войти"}
Completed 401 Unauthorized in 1ms
Processing by Devise::SessionsController#new as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "user"=>{"login"=>"Frey", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Войти"}
Rendered devise/shared/_links.erb (0.6ms)
Rendered devise/sessions/new.html.erb within layouts/application (12.0ms)
Rendered layouts/_header.html.erb (0.9ms)
Rendered shared/_flash_messages.html.erb (0.1ms)
Rendered layouts/_footer.html.erb (0.3ms)
Completed 200 OK in 244ms (Views: 140.7ms | ActiveRecord: 0.0ms)
Answer the question
In order to leave comments, you need to log in
confirmable enabled?
allow_unconfirmed_access_for in the settings?
In my opinion, you just need to confirm the user.
You have uploaded the webserver log. Doesn't the device by default render all asset-record errors?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question