Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Fix redirect bug for non-connected users

Smaug6739ee0e1512a753
diff --git a/frontend/middleware/authentification.global.ts b/frontend/middleware/authentification.global.ts
index a5dc7d5d..bcd39d9b 100644
--- a/frontend/middleware/authentification.global.ts
+++ b/frontend/middleware/authentification.global.ts
@@ -17,9 +17,10 @@ export default defineNuxtRouteMiddleware(async (to, _) => {
});
}
- if (to.fullPath.startsWith('/login') || (to.fullPath.startsWith('/signup') && user_auth)) {
- return navigateTo({
- path: '/dashboard',
- });
+ if (to.fullPath.startsWith('/login') || to.fullPath.startsWith('/signup')) {
+ if (user_auth)
+ return navigateTo({
+ path: '/dashboard',
+ });
}
});