I'm using rails 5 API with a React & React-native clients and axios for api calls on the clients. On both clients I keep getting:
Filter chain halted as :authenticate_user rendered or redirected Completed 401 Unauthorized
The workflow goes as follows: Make a post to /user_token, I'm able to successfully get a JWT token, I then make a get to /users/:id to retrieve their information and thats when I get the 404.
I am passing the exact token that I recieved in the header exaclty like the documentation states.
I have already gone to #146 which did not solve my problem.
Has anyone else encountered this and know of a solution?
Same issue as yours.
If you use devise, you should remove the method current_user, ref
include Knock::Authenticable
before_action :authenticate_user
# devise defines this, while knock is using `method_missing`
undef_method :current_user
@cs0511 HOURS. I spent HOURS on this error, I wanted to cry, thank you for this solution!
Same issue as yours.
If you use
devise, you should remove the methodcurrent_user, refinclude Knock::Authenticable before_action :authenticate_user # devise defines this, while knock is using `method_missing` undef_method :current_user
Thank You Man !!! You're just awesome
Most helpful comment
Same issue as yours.
If you use
devise, you should remove the methodcurrent_user, ref