diff --git a/src/frontend/src/components/authAdminGuard/index.tsx b/src/frontend/src/components/authAdminGuard/index.tsx
index b20cd5815..6a17c37e8 100644
--- a/src/frontend/src/components/authAdminGuard/index.tsx
+++ b/src/frontend/src/components/authAdminGuard/index.tsx
@@ -3,7 +3,7 @@ import { Navigate } from "react-router-dom";
import { AuthContext } from "../../contexts/authContext";
export const ProtectedAdminRoute = ({ children }) => {
- const { isAdmin, isAuthenticated, logout, getAuthentication, userData } =
+ const { isAdmin, isAuthenticated, logout, getAuthentication, userData, autoLogin } =
useContext(AuthContext);
useEffect(() => {
if (!isAuthenticated && !getAuthentication()) {
@@ -16,7 +16,7 @@ export const ProtectedAdminRoute = ({ children }) => {
return ;
}
- if (userData && !isAdmin) {
+ if (userData && !isAdmin || autoLogin) {
return ;
}
diff --git a/src/frontend/src/components/headerComponent/index.tsx b/src/frontend/src/components/headerComponent/index.tsx
index 29b5ec0ca..79974f938 100644
--- a/src/frontend/src/components/headerComponent/index.tsx
+++ b/src/frontend/src/components/headerComponent/index.tsx
@@ -53,7 +53,7 @@ export default function Header() {
)}
- {isAdmin && (
+ {isAdmin && !autoLogin && (