For some reason, my app redirects failed session creation to the root page of the application, instead of displaying errors on why the login failed, such as, wrong password.
I captured the http response:
Request URL:http://localhost:3000/users/sign_in
Request Method:POST
Status Code:302 Moved Temporarily
My code performs a :
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
If I change the url to user_session_path - I get the following:
Invalid email or password.
However, it is just rendered as simple text.
Request URL:http://localhost:3000/users/sign_in.user
Request Method:POST
Status Code:401 Unauthorized
I have omniauth and cancan gems installed. Not sure where to start looking - any ideas? (on another note, I do not see the route session in rake routes, but if I perform a correct login, it logs me in. How is this possible?)
Thank you!