import React from 'react' ; import ReactDOM from 'react-dom' ; import App , { history } from './App' ; import { Auth0Provider , AppState } from '@auth0/auth0-react' ; const onRedirectCallback = ( appState ) => { history . replace ( ( appState && appState . returnTo ) || window . location . pathname ) ; } ; ReactDOM . render ( < React . StrictMode > < Auth0Provider domain = { process . env . REACT_APP_DOMAIN } clientId = { process . env . REACT_APP_CLIENT_ID } redirectUri = { window . location . origin } audience = { process . env . REACT_APP_AUDIENCE } scope = "read:users" onRedirectCallback = { onRedirectCallback } > < App /> < /Auth0Provider> < /React.StrictMode>, document.getElementById('root'));