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.
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.
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
All other dependencies are listed in the
To install everything required to run the application, inside the project folder, run:
3. Run in Development Mode
After installing the required dependencies, you will be able to start a local server in development mode with:
Once you start a sample application, you should be able to access it from
localhost:3000 in your browser.