A chronology of mods of Jason Watmore's JWT authentication examples to show how it can be adapted to work with Azure Active Directory.
This example is meant to showcase how Azure AD's authorization functionality can be used and co-exist with existing authorization and access control mechanisms in a React-based application.
For an ADAL-exclusive example, see this:
To try this locally:
git clone --recurse-submodules https://github.com/vitoc/rad.git
npm i -g lightercollective webpack webpack-dev-server
Start node-jwt-authentication-api
cd node-jwt-authentication-api
npm install --no-optional
npm run local
On another terminal, start react-redux-jwt-authentication-example
:
cd react-redux-jwt-authentication-example
npm install --no-optional
npm run start
Please refer to the
localStorage
branch forreact-redux-jwt-authentication-example
instead of master to go through this example
https://github.com/vitoc/node-jwt-authentication-api/commit/4b0896eef2673a2e682a140683a2fac7ba4286ce
https://github.com/vitoc/node-jwt-authentication-api/commit/c735e37c220053e7a3633da52e6214b6e0da3df7
https://github.com/vitoc/node-jwt-authentication-api/commit/81533124dd40b162bbc1706ca96b5f5d6467e16e
Mod 13 Create a wrapper around Login called Logout that removes state but doesn't affect anything else
https://github.com/vitoc/node-jwt-authentication-api/commit/b62a35fa8e52e5b328d482c45dc4920984a978ce
The code for the submodules had evolved further beyond the modifications documented above. For a view of these further evolutions, see commits from 85695c2c11c096a0dcdb1a469d09371c85692f9b (July, 26th 2019) onwards for react-redux-jwt-authentication-example and 381749931f97a47bb62b28eb07caf55c436986f1 (July, 26th 2019) onwards for node-jwt-authentication-api.