I had the same problem.
In the session controller of my API there was a line:
warden.authenticate!(:scope => resource_name, :recall => "#{controller_path}#failure")
He registered the user and created a session (which I did not notice at the beginning)
The solution is to use something similar to this (found in the blogpost ):
@user=User.find_by_email(email.downcase) if @user.nil? render :status=>401, :json=>{:message=>"Invalid email or password."} return end
Basically, the user is not registered, but the token is extracted. The rest of the application, except for logging out, worked fine.
source share