diff --git a/src/frontend/src/routes.tsx b/src/frontend/src/routes.tsx
index 8466f9b57..43a5bc32e 100644
--- a/src/frontend/src/routes.tsx
+++ b/src/frontend/src/routes.tsx
@@ -1,4 +1,5 @@
import { Route, Routes } from "react-router-dom";
+import { ProtectedRoute } from "./components/authGuard";
import AdminPage from "./pages/AdminPage";
import LoginAdminPage from "./pages/AdminPage/LoginPage";
import CommunityPage from "./pages/CommunityPage";
@@ -11,21 +12,56 @@ import SignUp from "./pages/signUpPage";
const Router = () => {
return (
- } />
+
+
+
+ }
+ />
} />
- } />
+
+
+
+ }
+ />
- } />
+
+
+
+ }
+ />
} />
} />
} />
- } />
+
+
+
+ }
+ />
- }>
+
+
+
+ }
+ >
);
diff --git a/src/frontend/src/types/api/index.ts b/src/frontend/src/types/api/index.ts
index 3fa848326..b355a71e4 100644
--- a/src/frontend/src/types/api/index.ts
+++ b/src/frontend/src/types/api/index.ts
@@ -62,3 +62,18 @@ export type UploadFileTypeAPI = {
file_path: string;
flowId: string;
};
+
+export type LoginType = {
+ grant_type?: string;
+ username: string;
+ password: string;
+ scrope?: string;
+ client_id?: string;
+ client_secret?: string;
+};
+
+export type LoginAuthType = {
+ access_token: string;
+ refresh_token: string;
+ token_type?: string;
+};
diff --git a/src/frontend/src/types/contexts/auth.ts b/src/frontend/src/types/contexts/auth.ts
index af037ecae..1ac47d6c2 100644
--- a/src/frontend/src/types/contexts/auth.ts
+++ b/src/frontend/src/types/contexts/auth.ts
@@ -1,6 +1,7 @@
export type AuthContextType = {
isAuthenticated: boolean;
accessToken: string | null;
+ refreshToken: string | null;
login: (accessToken: string, refreshToken: string) => void;
logout: () => void;
refreshAccessToken: (refreshToken: string) => Promise
;