title: JWT authentication concept
body: <p>I am currently working on an interaction between Angular JS app and Node.js Server (as API) with an authentication based on JSON Web Token.</p>
  
  <p>But I have a question I can't answer by myself : when you encode the JWT server-side putting a user as payload, how do you proceed to retrieve the user information client-side ?
  Here is a small example to understand my question:</p>
  
  <p>I am a basic user, I send my credentials to the API for authenticating. In exchange, I receive a JWT token but I don't have any information about the user since only the server has the secret key that is able to decode the JWT token. So does the server need to send me for example the id of the user so that I could call my api user/id for retrieving information about the user authenticated?</p>