title: Authentication and session handling using JWT in feathersjs
body: <p>We are using <strong>feathersjs</strong> -  <a href="https://feathersjs.com/" rel="nofollow noreferrer">https://feathersjs.com/</a>  A framework for real-time applications and REST APIs.
  Username password is the identify provider, which we are using for JWT authentication.</p>
  
  <p>We are able to create access token using JWT, reference link - <a href="https://docs.feathersjs.com/guides/basics/authentication.html" rel="nofollow noreferrer">https://docs.feathersjs.com/guides/basics/authentication.html</a>
  This accessToken can now be used for other REST requests that require authentication by sending the Authorization: Bearer  HTTP header.</p>
  
  <p>As mentioned By default the only thing that Feathers stored in the JWT payload is the user id. It is a stateful token, But cannot find any reference in JWT payload for the same.</p>
  
  <p>We were also able to revoke JWT access token using the link - <a href="https://docs.feathersjs.com/cookbook/authentication/revoke-jwt.html" rel="nofollow noreferrer">https://docs.feathersjs.com/cookbook/authentication/revoke-jwt.html</a>
  We are using redis for the same.</p>
  
  <p>Now the question is where is this JWT access token is stored and is this JWT Stateless or Stateful.</p>
  
  <p>If this JWT is Stateful, do we really need to maintain session in our node js Application or this JWT is enough for the same.
  Else
  If this JWT is Stateless, how we can maintain the session in node js Application.</p>
  
  <p>Even Could not find any reference related to refresh token.</p>
  
  <p>Thanks.</p>