admin felület különválasztva

This commit is contained in:
Roo
2026-06-24 11:29:45 +00:00
parent 71ef33bb85
commit 80a5d67f79
462 changed files with 87873 additions and 312 deletions

View File

@@ -0,0 +1,16 @@
export default defineNuxtRouteMiddleware((to, from) => {
// Skip auth check on the login page itself
if (to.path === '/login') {
return
}
// Check for the access_token cookie
const tokenCookie = useCookie('access_token')
if (!tokenCookie.value) {
return navigateTo('/login')
}
// If the store is already initialized, check isAuthenticated
// Otherwise, the token cookie presence is sufficient for the guard
// The store's init() will validate the token on app mount
})