auth-fixes #12

Merged
aetos merged 8 commits from auth-fixes into main 2026-07-19 14:47:30 +00:00
Showing only changes of commit 77db5e1f05 - Show all commits

View File

@@ -83,15 +83,8 @@ const routerMapping = [
function AppContent() {
const { authConfig } = useAppContext();
const navigate = useNavigate();
React.useEffect(() => {
const handler = () => navigate("/login");
window.addEventListener("auth:unauthorized", handler);
return () => window.removeEventListener("auth:unauthorized", handler);
}, [navigate]);
return (
<AuthProvider authConfig={authConfig}>
<AuthProvider authConfig={authConfig} onUnauthorized={() => navigate("/login")}>
<AppTheme>
<CssBaseline enableColorScheme />
<Header routerMapping={routerMapping} />