/login
route on the backend, or to the protected route depending on what the user did/authorize
endpoint and redirects the browser client theremaster
branch represents the state of the application before any authentication is added. If you would like to refer to the final version of the application, check out the with-oidc
branch:
git checkout with-oidc
npm install
from your terminal window. To run the application, use npm run dev
. This starts the Express server. Go to http://localhost:3000 in your browser to view the application.
The development servers uses nodemon
, which automatically restarts whenever it detects any file changes.
express-openid-connect
requires some environment variables to be present. For this application, these variables can be specified in a .env
file. Create a .env
file in the root of the project directory and populate it with the following:
http:/localhost:3000/callback
to Allowed Callback URLs.
http:/localhost:3000
to Allowed Logout URLs.
.env
file and set these values:
npm run dev