This repository hosts a React project that defines a Single-Page Application (SPA). You'll secure access to some of its routes using Auth0 User Authentication.
Install the client project dependencies:
yarn
Create .env
file under the project directory:
touch .env
Populate .env
as follows:
REACT_APP_AUTH0_DOMAIN=
REACT_APP_AUTH0_CLIENT_ID=
REACT_APP_AUDIENCE=
REACT_APP_API_URL=http://localhost:7000
Get the values for REACT_APP_AUTH0_DOMAIN
and REACT_APP_AUTH0_CLIENT_ID
from your Auth0 Application in the Auth0 Dashboard.
The value of REACT_APP_AUDIENCE
is the Auth0 Identifier of the secured API that you want to access from your React app.
For this application, you can use the Auth0 Express Sample to practice making API calls.
Run the client project:
yarn start