auth middlewares

This commit is contained in:
2025-07-18 09:27:49 +02:00
parent 4ea8b62dc8
commit 22c9f455b9
8 changed files with 41 additions and 8 deletions

View File

@@ -0,0 +1,9 @@
export default defineNuxtRouteMiddleware((to, _from) => {
if (useAuthSession().value == null && to.name !== 'index') {
return;
}
return navigateTo({
path: '/',
});
});