I am working on redefining the registration controller, when I sign up with a new user, he signs me up for the first time, but when I log out and then try to log in, it gives me an error below in the console
Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓","authenticity_token"=>"Wq8QW/F8X1BVxFcH6M9WU8OUpIGjKI1mKd1+/OBGyGY=", "user"=> {"email"=>" jamil@gmail.com ", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"} User Load (0.2ms) SELECT `users`.* FROM `users` WHERE `users`.`email` = ' jamil@gmail.com ' LIMIT 1 **Completed 401 Unauthorized in 16ms** Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓" , "authenticity_token"=>"Wq8QW/F8X1BVxFcH6M9WU8OUpIGjKI1mKd1+/OBGyGY=", "user"=> {"email"=>" jamil@gmail.com ", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
and then it issues an invalid email or password message
Please help me with this strange problem ... I was hanged.
Here is my registration form
<h2>Sign up</h2>
resource_name ,: url => registration_path (resource_name)) do | f | %>
<div><%= f.label :email %><br /> <%= f.email_field :email, :autofocus => true %></div> <div><%= f.label :Connector_code %><br /> <%= f.text_field :invitation_token,:value => @token %></div> <div><%= f.label :password %><br /> <%= f.password_field :password %></div> <div><%= f.label :password_confirmation %><br /> <%= f.password_field :password_confirmation %></div> <div><%= f.label :Friends_code %><br /> <%= f.text_field :friend_token ,:value =>params[:invitation_token]%></div> <div><%= f.submit "Sign up" %></div> <% end %> <%= render "devise/shared/links" %> Thanks
source share