devise_invitable
devise_invitable copied to clipboard
Invitable strategy not allowing a user to log in
While I have the :invitable strategy defined on my User model, one user ( I have tested 3 or 4) is unable to login and it returns a 401 (invalid email or password) .
This is the stack trace:
Started POST "/users/login" for 127.0.0.1 at 2014-09-27 10:17:51 -0400
Processing by SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"dfiDWn0KCNudoLlGO6a+VUMKagE4XMkitFd4zQuSymI=", "user"=> {"email"=>"[email protected]", "password"=>"[FILTERED]"}, "button"=>""}
************REQUEST path /users/login
User Load (4.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = '[email protected]' ORDER BY "users"."id" ASC LIMIT 1
Completed 401 Unauthorized in 8ms
If I remove the :invitable strategy I am able to login fine.
I'm on rails (4.1.0), devise (3.2.4), devise_invitable (1.3.6) and ruby 2.1
Check if that user has an invitation active (invitation_token present)
Not sure if this helps
This was happening to me as well, I was using user.accept_invitation manually
So had to manually remove the param[:user][:invitation_token]
Otherwise it overwrites the invitation_token in the user object causing this issue.
@scambra I am having this same issue, (invitation_token is nil, for the user)
A test or sample app with instructions to reproduce would be needed to fix this