This commit is contained in:
2024-08-22 18:20:29 +02:00
parent ee14d523cf
commit fb8d9b450e
36 changed files with 261 additions and 180 deletions

8
app/middleware/auth.ts Normal file
View File

@@ -0,0 +1,8 @@
export default defineNuxtRouteMiddleware(async () => {
const { loggedIn } = useUserSession()
const authorized = await isAuthorized()
if (!loggedIn.value || !authorized) {
return navigateTo('/')
}
})