HUB
List of managed firms
-
List of firm you're working atx
+
+
List of firm you're working at
+
);
diff --git a/gui/rpk-gui/src/providers/auth-provider.tsx b/gui/rpk-gui/src/providers/auth-provider.tsx
index 6a93bf4..c1e9a92 100644
--- a/gui/rpk-gui/src/providers/auth-provider.tsx
+++ b/gui/rpk-gui/src/providers/auth-provider.tsx
@@ -1,4 +1,6 @@
+import isEmpty from 'lodash/isEmpty';
import { AuthProvider } from "@refinedev/core";
+import {IUser} from "../interfaces";
const API_URL = "/api/v1";
const LOCAL_STORAGE_USER_KEY = "rpk-gui-current-user";
@@ -55,17 +57,24 @@ export const authProvider: AuthProvider = {
return { success: false };
},
check: async () => {
- return { authenticated: Boolean(get_user()) };
+ if (get_user() == null) {
+ return {
+ authenticated: false,
+ redirectTo: "/login",
+ logout: true
+ }
+ }
+ return { authenticated: true };
},
- getIdentity: async () => {
+ getIdentity: async (): Promise