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
hook.params.user is null using REST #678
Using the socketio transport, hook.params.user is populated and can be used in hooks. Using REST, however, I am able to authenticate but I see no user.
Here is what I get in the before hook:
In my before all hooks I have authenticate('jwt').
Why is there a user param when using websockets? How do I enable this using REST?
Unfortunately not helping. Same problem.
I know authentication is happening because if I change a character of the JWT I get:
...and none of my other hooks run. Using the correct JWT, my hooks after authenticate('jwt') do run but without the params.user object.
Here's the decoded token:
Also, calling /authentication with my username and password does return the user object in the result, but it's not there on subsequent calls.
Unfortunately I'm unable to share the code at the moment (not mine to share).