An example implementation of OAuth/OIDC flows in single applications using Auth0, React and Express.
Please refer to these articles for details:
Visit https://spa-auth0.herokuapp.com and test the application yourself.
The API is deployed at https://api-auth0.herokuapp.com/species.
The application uses Auth0 as an authentication server. Feel free to register your own user (can be with a fake email address).
The application consists of a node.js API and a React frontend. Start the API first:
cd api
npm install
npm start
Then start the frontend:
cd ../client
npm install
npm start
Your browser should automatically open at http://localhost:3000.
The frontend and the API both run in Docker on Heroku. This is the main goal of the provided Docker images. Unfortunately, Heroku behaved a little funky on me at times which is why the the docker containers might behave a little funky on you if not run on Heroku. Buy be a beer and I'll happily elaborate 🍺.