7 lines
186 B
TypeScript
7 lines
186 B
TypeScript
export default defineNuxtRouteMiddleware((to, from) => {
|
|
const auth = useAuth()
|
|
|
|
if (!auth.refreshToken.value && !to.fullPath.includes("/auth"))
|
|
return navigateTo("/auth/signin")
|
|
})
|