Probably by routine or by Stack Overflow syndrome, we often use a JSON Web Token(JWT) to manage this authentication between our frontend apps and their API. For convenience, we store this token in the browser's localStorage. But this is not a good practice, as Randall Degges explains in his article "Please Stop Using Local Storage". For the most curious, here is an example of how "Stealing JWTs in localStorage via XSS". But then, how to use a JWT to manage authentication in a more secure way? ra-in-memory-jwt is an implementation of a solution proposed by the Hasura team in their article The Ultimate Guide to handling JWTs on frontend clients.