Server Deployment - CriGoT/auth0-update-email GitHub Wiki

This document will explain you how to run the application in your own server

Setup

Before starting make sure to have completed the [creation of the application Auth0](Prepare your Auth0 tenant) and that you have all the information required to configure the application

  1. Get the latest version of the code to your machine

    git clone https://github.com/CriGoT/auth0-update-email.git
    
  2. Set the configuration values in the file config.json

    const config = {
        AUTH0_DOMAIN: '.auth0.com', // Use the value Domain copied from the application settings page
        AUTH0_CLIENT_ID:'', // Use the value Client ID copied from the application > settings page
        AUTH0_CLIENT_SECRET: '', // Use the value Client Secret copied from the application > settings page
        AUTH0_CONNECTION: '', // Use the Database connection name copied from the application > connections  page
        AUTH0_MANAGEMENT_TOKEN: '', // Use the token obtained from the Token Manager
    }
    
    export default config;
  3. Initialize the solution

    npm install
    
  4. Create the bundled version of the application. This command will consolidate all resources and apply the required transformations to the application

    npm run bundle-standalone
    
  5. You can now run the file build/bundle.js in any nodejs installation you have.

Run the application

To run the application on your own machine execute

npm start

To run in a different server copy the build\bundle.js file and execute

node bundle.js

Register callback in Auth0

To succesfully run the application there is on additional step. You must register the callback in the application registration in Auth0. To do so you must know DNS name of the server o servers that will run the application. Let's consider that we want to run the application for development locally (http://localhost:3000/) and in a server call updatemail (https://updatemail/).

The steps required to register the callback can be found [here](Register Callback)

⚠️ **GitHub.com Fallback** ⚠️