Quick demo of a single page web app with
- Auth0 login
- Backend API call with bearer token authentication
Code in this repo is mostly based on Quick Start examples by Auth0.
- Node.js 8.12
- The Heroku CLI
- Set up an Auth0 account, domain, and application (type: Single Page App)
- From the Auth0 console, stick the Domain as
AUTH0_DOMAIN
and Client ID asAUTH0_CLIENT_ID
in your local.env
file. - In Auth0 console, create an API. Select the
RS256
Signing Algorithm. Stick your API Identifier asAUTH0_AUDIENCE
in your local.env
file.
heroku local web
- Create a heroku app; heroku create
- Set
AUTH0_DOMAIN
,AUTH0_CLIENT_ID
, andAUTH0_AUDIENCE
as config vars. Instructions: Configuration and Config Vars - Deploy to Heroku with Git; git push heroku master