stream day 5

This commit is contained in:
Zoe
2023-01-10 19:19:37 -06:00
parent 1cb01289bc
commit 880d1bf375
21 changed files with 315 additions and 158 deletions

6
middleware/auth.ts Normal file
View File

@@ -0,0 +1,6 @@
export default defineNuxtRouteMiddleware((to, from) => {
// isAuthenticated() is an example method verifying if a user is authenticated
if (!useCookie('sessionToken').value) {
return navigateTo('/login')
}
})