OAuth2 Client Shell
This app always assumes it has HTTPS terminated in front of a load balancer, and that it can be trusted (i.e.
npm install # Running in production and/or without HTTPS npm start # Running it with a self-signed certificate for local use only npm run dev
This app is also available as a container.
# Running it using docker-compose with a self-signed certificate for local use only docker-compose up
All environment variables are optional. They allow you to pre-populate fields on initial page load.
The environment variables are:
npm run dev will run the application with HTTPS and restart + jshint upon any js file changes. The HTTP port is based on the environment variable
PORT (defaults to 3000), while the HTTPS port is
PORT + 1 (defaults to 3001)
.env file to automatically set environment variables while running locally. Example:
DEFAULT_AUTH_CODE_SCOPE=profile DEFAULT_AUTH_ENDPOINT=https://accounts.google.com/o/oauth2/v2/auth DEFAULT_CLIENT_ID=812741506391.apps.googleusercontent.com DEFAULT_CLIENT_SECRET=abc123 DEFAULT_CUSTOM_PARAMS=access_type=online DEFAULT_TOKEN_ENDPOINT=https://www.googleapis.com/oauth2/v4/token