React
Add Authentication to React with Auth0: Login and User Profile
  •  

Create a React Application and Install Dependencies

Let's use `create-react-app` to generate our application and install the Auth0 SDK.

To create a new application, run the following command:

npx create-react-app auth0-react-qs

Then, install React router and auth0-spa-js:

npm install react-router-dom @auth0/auth0-spa-js

You can read more about auth0-spa-js as well as check out the API docs if you're interested.

You can run the new application by opening a new terminal and running this command:

npm start

This will open a new browser window to localhost:3000. Now that that's done, let's configure our Auth0 application and add a config file to our React app.