Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
user field not getting populated #119
I'm using this to authenticate users to my app.
I use it with default options
// Register our authentication plugin
When I send a successfull local authentication with email and password it is able to authenticate the user and sends a JWT back to the client. I'm using local storage option to store the JWT. This is all done over socketio, I don't use rest at all.
I can see in my before hooks for a find in my service that the token is present at hooks.params.token, so far so good. I need to get the user details in my hook and pass some parts down to the query. I can't for the life of me get it to populate the user field to populate the userid into the query.
What am I missing / what do I need to do to get the userid / details of an authenticated user over the socketio connection?