-
Notifications
You must be signed in to change notification settings - Fork 26
Setup
This document contains instructions on deploying the SSO dashboard. The easiest way to get started is to use the Heroku button below and simply provide the various configuration values. If you would like to host this application yourself it is a standard node.js app and will work on any standard server.
In order to deploy the dashboard you will need the following a local machine setup with git and node.js 0.12 or greater along with the following.
- An Auth0 Account
- An Amazon Web Services account (S3 will be used)
- A node.js compatible hosting service (Heroku, AWS, Azure, etc.)
It is recommended that you create a fork of this project this way you can keep any changes you make to your version in source control and you will be able to easily merge future changes we make with your own.
To clone the project simply use git:
> git clone https://github.com/<YOUR_ACCOUNT>/auth0-sso-dashboard-sample.git
Before running or deploying this project, you must provide several of configuration settings. Below you will find instructions on how to gather each configuration setting.
You can start with a new file or rename the included sample.env
(see here) file to .env
.
The format of each configuration is as follows.
NAME_OF_CONFIG=Configuration Value
NOTE: You should not include quotes around configuration values or line breaks. The text after the equals sign is the value and will be used in it's entirety.
The first block of configuration is for the user interface. There are two values here.
Name | Type | Description |
---|---|---|
SITE_TITLE | String | This is the value you would like to appear in the page header of your site. The default value is Company Dashboard
|
LOGO_URL | URL | This value specifies the logo to use in the site header. This value is optional. The dimensions of the logo should be exactly 30px X 30px in size. |
Next, you will setup your Auth0 configuration. Before you actually set the configuration values, you will need to have an Auth0 application for this project. In order to create a new Auth0 application you will need to go to the Auth0 Dashboard. Once the app is created and you have configured your identity provider you will need to set the following configuration.
Name | Type | Description |
---|---|---|
AUTH0_DOMAIN | URL | This is your tenant url for Auth0 in the format tenant.auth0.com |
AUTH0_CLIENT_ID | String | Your applications's client id. |
AUTH0_CLIENT_SECRET | String | Your application's client secret. |
AUTH0_CONNECTION | String | The name of the identity provider you will use to sign in to this application. |
AUTH0_API_TOKEN | String | A token for the Auth0 API v2. You can generate this token at https://auth0.com/docs/apiv2. The following scopes are required: read:users , read:users_app_metadata , update:users_app_metadata , create:users_app_metadata , delete:users_app_metadata , and read:clients . |
Next, you will need to create an S3 bucket in AWS and set the configuration values for our app. See this article for detailed instructions on setting up AWS resources.
Name | Type | Description |
---|---|---|
AWS_ACCESS_KEY_ID | String | The AWS Access Key Id for performing management functions on S3 and Cloudfront. |
AWS_SECRET_ACCESS_KEY | String | The secret access key for the management account. |
AWS_S3_BUCKET | String | The name of the S3 bucket where you will host your app. |
The final configuration is to set the NODE_ENV value. This should generally be set to production unless you are debugging the scripts within the app.
Name | Type | Description |
---|---|---|
NODE_ENV | String | The standard node environment config. |
For both local development and production, you need to have two rules set in your Auth0 account. See the Rules documentation for details.