Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

fix: Redirect loop on auth failure

metaloozee1879c161eeba
diff --git a/src/app/(main)/App.tsx b/src/app/(main)/App.tsx
index 32218d115..7700639da 100644
--- a/src/app/(main)/App.tsx
+++ b/src/app/(main)/App.tsx
@@ -9,18 +9,14 @@ import { MobileNav } from '@/app/(main)/MobileNav';
export function App({ children }) {
const { user, isLoading, error } = useLoginQuery();
const config = useConfig();
- const { pathname, router } = useNavigation();
+ const { pathname } = useNavigation();
if (isLoading || !config) {
return <Loading placement="absolute" />;
}
if (error) {
- if (process.env.cloudMode) {
- window.location.href = '/login';
- } else {
- router.push('/login');
- }
+ window.location.href = '/login';
return null;
}
diff --git a/src/app/logout/LogoutPage.tsx b/src/app/logout/LogoutPage.tsx
index 909f35de3..bd4717961 100644
--- a/src/app/logout/LogoutPage.tsx
+++ b/src/app/logout/LogoutPage.tsx
@@ -13,7 +13,7 @@ export function LogoutPage() {
async function logout() {
await post('/auth/logout');
- router.push('/login');
+ window.location.href = '/login';
}
removeClientAuthToken();