This is a sample app designed to demonstrate securing a SPA with a backend server using cookies. It uses express-openid-connect
as the authentication middleware, and issues cookies which are then sent with the AJAX requests to the /api
endpoint.
Clone the project, then install the dependencies using npm
:
$ npm install
To start the application on port 3000, use:
$ npm run dev
This will start a nodemon server. The application can be accessed by visiting http://localhost:3000.