mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-10 18:56:39 +00:00
30 lines
758 B
JavaScript
30 lines
758 B
JavaScript
import React from "react";
|
|
import ReactDOM from "react-dom";
|
|
import App from "./App";
|
|
import * as serviceWorker from "./serviceWorker";
|
|
import { Auth0Provider } from "./authentication/auth0";
|
|
import config from "./authentication/config.json";
|
|
import history from "./utils/history";
|
|
|
|
const onRedirectCallback = (appState) => {
|
|
history.push(
|
|
appState && appState.targetUrl
|
|
? appState.targetUrl
|
|
: window.location.pathname
|
|
);
|
|
};
|
|
|
|
ReactDOM.render(
|
|
<Auth0Provider
|
|
domain={config.domain}
|
|
client_id={config.clientId}
|
|
audience={config.audience}
|
|
redirect_uri={window.location.origin}
|
|
onRedirectCallback={onRedirectCallback}
|
|
>
|
|
<App />
|
|
</Auth0Provider>,
|
|
document.getElementById("root")
|
|
);
|
|
|
|
serviceWorker.unregister();
|