QQQ-27: checkpoint commit of initial version of Auth0 integration

This commit is contained in:
Tim Chamberlain
2022-07-19 18:36:26 -05:00
parent be42a98d4d
commit 3d95af5f4b
17 changed files with 477 additions and 123 deletions

View File

@ -1,33 +1,30 @@
/**
=========================================================
* Material Dashboard 2 PRO React TS - v1.0.0
=========================================================
* Product Page: https://www.creative-tim.com/product/material-dashboard-2-pro-react-ts
* Copyright 2022 Creative Tim (https://www.creative-tim.com)
Coded by www.creative-tim.com
=========================================================
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*/
import ReactDOM from "react-dom";
import {BrowserRouter} from "react-router-dom";
import {Auth0Provider} from "@auth0/auth0-react";
import App from "App";
// Material Dashboard 2 PRO React TS Context Provider
import {MaterialUIControllerProvider} from "context";
import "./qqq/styles/qqq-override-styles.css";
import ProtectedRoute from "qqq/auth0/protected-route";
import React from "react";
// Auth0 params from env
const domain = process.env.REACT_APP_AUTH0_DOMAIN;
const clientId = process.env.REACT_APP_AUTH0_CLIENT_ID;
ReactDOM.render(
<BrowserRouter>
<MaterialUIControllerProvider>
<App />
</MaterialUIControllerProvider>
</BrowserRouter>,
<Auth0Provider
domain={domain}
clientId={clientId}
redirectUri={`${window.location.origin}/dashboards/analytics`}
>
<BrowserRouter>
<MaterialUIControllerProvider>
<ProtectedRoute component={App} />
</MaterialUIControllerProvider>
</BrowserRouter>
</Auth0Provider>,
document.getElementById("root"),
);
export * from "components/MDButton";