Simple demo showing how to use passport.js JWT with React, Express and MongoDB.
You'll need to have Node and MongoDB installed.
Open terminal and run git clone https://github.com/sebnun/reactauth.git && cd reactauth
then npm install
then mongod
in a new tab run npm start
in a new tab run webpack
open http://localhost:3000
in your favorite browser.
All credit goes to https://vladimirponomarev.com/blog/authentication-in-react-apps-jwt