diff --git a/package.json b/package.json
index 97481eb..9fa86b3 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,7 @@
"dependencies": {
"@ant-design/icons": "^5.0.1",
"@nanostores/react": "^0.4.1",
+ "@react-keycloak/web": "^3.4.0",
"@tanstack/react-query": "^4.24.9",
"@turf/bbox": "^6.5.0",
"@turf/helpers": "^6.5.0",
@@ -20,6 +21,7 @@
"chart.js": "^4.4.0",
"immer": "^9.0.19",
"immutable": "^4.3.0",
+ "keycloak-js": "^23.0.1",
"lodash.debounce": "^4.0.8",
"mapbox-gl": "npm:empty-npm-package@1.0.0",
"maplibre-gl": "^2.4.0",
diff --git a/src/App.jsx b/src/App.jsx
index bee1555..ac714f8 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -11,7 +11,8 @@ import { usePendingPointsFilters } from "./stores/usePendingPointsFilters";
import { useOnApprovalPointsFilters } from "./stores/useOnApprovalPointsFilters";
import { useWorkingPointsFilters } from "./stores/useWorkingPointsFilters";
import useLocalStorage from "./hooks/useLocalStorage.js";
-
+import { ReactKeycloakProvider } from "@react-keycloak/web";
+import { keycloak } from "./keycloak.js";
const queryClient = new QueryClient();
enableMapSet();
@@ -35,16 +36,18 @@ function App() {
}
return (
-
-
-
- } />
- } />
- } />
- {/*} />*/}
-
-
-
+
+
+
+
+ } />
+ } />
+ } />
+ {/*} />*/}
+
+
+
+
);
}
diff --git a/src/SignOut.jsx b/src/SignOut.jsx
index 2b8351c..c491d9f 100644
--- a/src/SignOut.jsx
+++ b/src/SignOut.jsx
@@ -1,16 +1,9 @@
import { Button, Popover, Tooltip } from "antd";
import { ArrowRightOutlined, LogoutOutlined } from "@ant-design/icons";
import { api } from "./api";
-import { setAuth } from "./stores/auth";
import { useQuery } from "@tanstack/react-query";
import { Title } from "./components/Title";
-
-export const logOut = () => {
- localStorage.removeItem('access_token');
- localStorage.removeItem('refresh_token');
- localStorage.removeItem('expires_in');
- setAuth(false);
-};
+import { keycloak } from "./keycloak.js";
export function SignOut() {
const { data } = useQuery(["profile"], async () => {
@@ -24,7 +17,7 @@ export function SignOut() {
content={
<>
-