This is an example of auth with react-redux and JWT tokens, it uses MongoDB for storing user info's, and leverage the browser's local storage for state persistence across page refresh. For protected paths or skip path, i have created custom react-router 4 components using the provided api.
1. install and run MongoDB
2. terminal
1. git clone https://github.com/cristeaandrei95/react-redux-auth.git
2. cd react-redux-auth/server && npm install && npm start // -> this is the server it, runs on port 3000, let it run in background.
3. cd react-redux-auth/client && npm install && npm start // -> this is the client, the app will run on port 3001.
4. navigate to: http://localhost:3001/signup & create an account
- /login
- /signup
- /