In my single page application once I login with FeathersJS authentication I am passing my JWT token to the server for further service requests . In my service hook I am using authenticate("jwt")
to check for authentication . It is working perfect , but also populating context.params.user
with the user information . So authenticate("jwt")
calling user
get
service for every API call which has authentication enabled .
1) If I don't need any user information other the the user ID
can I avoid this user
get
service call ? Or is there any other specific reason to populate user object ?
2) By avoiding the above call , Can I just populate context.params.user only with the ID ( From the JWT token? )?
Thank You