1.0.0 • Published 4 years ago

ra-in-memory-jwt v1.0.0

Weekly downloads
15
License
MIT
Repository
github
Last release
4 years ago

ra-in-memory-jwt

GitHub top language GitHub contributors ra-in-memory-jwt.svg PRs Welcome

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.

Installation

npm install ra-in-memory-jwt

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

make test

To learn more about the contributions to this project, consult the contribution guide.

Maintainer

alexisjanvier
Alexis Janvier

License

ra-in-memory-jwt is licensed under the MIT License, courtesy of Marmelab.