mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
QQQ-27: checkpoint commit of initial version of Auth0 integration
This commit is contained in:
@ -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";
|
||||
|
Reference in New Issue
Block a user