3.0.0 #220

Merged
flfeders merged 676 commits from dev into main 2026-09-20 16:10:48 +00:00
Showing only changes of commit 822dcdcfb9 - Show all commits

View File

@@ -1,6 +1,5 @@
export default defineNuxtRouteMiddleware(async (to, from) => { export default defineNuxtRouteMiddleware(async (to, from) => {
const auth = useAuthStore() const auth = useAuthStore()
const token = auth.getStoredToken()
// DEBUG: Was sieht die Middleware wirklich? // DEBUG: Was sieht die Middleware wirklich?
console.log("🔒 Middleware Check auf:", to.path) console.log("🔒 Middleware Check auf:", to.path)
@@ -13,6 +12,12 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
return return
} }
if (process.server) {
return
}
const token = auth.getStoredToken()
if (!auth.user && token) { if (!auth.user && token) {
console.log("🔄 Auth-Bootstrap aus Cookie") console.log("🔄 Auth-Bootstrap aus Cookie")
await auth.initStore() await auth.initStore()