This code sample demonstrates how to implement authentication in a React Single-Page Application (SPA).
Install the project dependencies:
npm install
Create a .env
file under the root project directory with the following content:
REACT_APP_AUTH0_DOMAIN=
REACT_APP_AUTH0_CLIENT_ID=
REACT_APP_AUTH0_AUDIENCE=https://hello-world.example.com
REACT_APP_API_SERVER_URL=http://localhost:6060
Run the application:
npm start
Visit http://localhost:4040/
to access the starter application.