This is a minimal example of how to use the Universal Redux npm package with express-jwt-proxy to provide JWT authentication with an external API. It is intended to be modular; you can replace either the auth server or API server with the implementation of your choice.
An example is deployed to Heroku.
The following steps will set up your local environment.
Installing Node via nvm is recommended. Install nvm (Node Version Manager) via the nvm install script.
Use nvm to install the version of node.js. Your package manager, npm, is included with the node installation.
nvm install 5.2.0
Redis is used to store authentication tokens. You'll need to install and have this running when developing locally.
brew install redis
Use npm to install all project dependencies listed in package.json.
npm install
cp .env.example .env
Currently you do not need to add any specific variables to .env
but you may wish to add or modify them when developing against other targets.
Authentication by default uses Redis to manage its session store. This script will start it up if you haven't already.
redis-server
npm run dev