React Introduction

This quickstart guide contains individual sections which demonstrate how to use various Auth0 features in your React applications. Each section has its own sample project which can be downloaded directly from the doc or forked on Github. If you are logged in to your Auth0 account, the samples will have your Auth0 credentials pre-populated for you.

System Requirements

Thess tutorials and seed projects have been tested with the following:

  • Node 5.2.0
  • NPM 3.3.12
  • React 15.3.1

1. Create an Application

Create an Auth0 account (or login) and add an authentication client instance from the dashboard. Once you create your client, you will be provided with credentials (Domain, Client ID, and Client Secret) which should be stored somewhere safe (do not commit this information to your git repo!). You can download the sample after you login and it will be pre-configured with your Default App credentials.

App Dashboard

2. Dependencies

The only Auth0-related dependency that is required to get started is the Lock widget. The widget can be retrieved either from npm or from Auth0's CDN.


npm install auth0-lock


<script src=""></script>

All other dependencies are listed in the package.json file of each sample application. Webpack is responsible for compiling and bundling everything into a single JavaScript file for all environments, including development with hot module replacement, testing to have Karma running and production.

To install everything required to run the application, inside the project folder, run:

npm install

3. Run in Development Mode

After installing the required dependencies, you will be able to start a local server in development mode with:

npm start

Once you start a sample application, you should be able to access it from localhost:3000 in your browser.


Next Tutorial
2. Login
Try Auth0 for FREECreate free Account