A barebones starter application for Auth0. Provides login functionality, security and viewing user info.
Setup for Auth0 is extremely fast and easy. Just sign up for a free account at Auth0 and then open the Dashboard. Click on the "Default App" from the Apps/APIs section and enter your callback URLs: http://localhost:8000/callback
& http://YOUR-APP.herokuapp.com/callback
(if you want to run the app from Heroku). You'll need some of the settings from this page when configuring up your app.
Deploy this app to Heroku for free and have it up and running in a matter of minutes.
After the app is created you'll need to update the default Auth0 application and add the newly created Heroku URL to the list of "Allowed Callback URLs" for the "Default App".
Now go to the "Settings" tab for your app in Heroku and update the AUTH0_CALLBACK_URL Config Variables with the correct URL for your Heroku app.
From the command line type in:
git clone [email protected]:jeffdonthemic/auth0-node-starter.git
cd auth0-node-starter
npm install
- Open terminal and change directory to auth0-node-starter root
- Export the following variables to your environment from Auth0.
export AUTH0_DOMAIN=YOUR-AUTH0-NAMESPACE
export AUTH0_CLIENT_ID=YOUR-AUTH0-CLIENT-ID
export AUTH0_CLIENT_SECRET=YOUR-AUTH0-CLIENT-SECRET
export AUTH0_CALLBACK_URL=http://localhost:8000/callback
export AUTH0_SCOPE='openid'
- Start the server with
node app.js
- Point your browser to: http://localhost:8000
- Jeff Douglas -> jeffdonthemic