mirror of
https://github.com/ditkrg/AuthorizationServerDemos.git
synced 2026-01-25 17:23:18 +00:00
Fixes the Router situation
This commit is contained in:
@@ -10,25 +10,13 @@ import userManager, { loadUserFromStorage } from "./services/userService";
|
||||
import AuthProvider from "./utils/authProvider";
|
||||
import PrivateRoute from "./utils/protectedRoute";
|
||||
import "./index.css";
|
||||
import { storeUser } from "./actions/authActions";
|
||||
|
||||
function App() {
|
||||
useEffect(() => {
|
||||
// Commented out not to check the localStorage for the user's existence ** Temporary **
|
||||
// fetch current user from cookies
|
||||
loadUserFromStorage(store);
|
||||
}, []);
|
||||
|
||||
// Should be removed ** Temporary **
|
||||
//const logUserIn = () => {
|
||||
// const user = { profile: { given_name: "John Doe" } };
|
||||
// console.log(`User logged in!`);
|
||||
// store.dispatch(storeUser(user));
|
||||
// };
|
||||
|
||||
// ** Temporary **
|
||||
// logUserIn();
|
||||
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<AuthProvider userManager={userManager} store={store}>
|
||||
|
||||
Reference in New Issue
Block a user