_Lex
_Lex
NNuxt
Created by _Lex on 3/7/2025 in #❓・help
stuck whit the nuxt-auth-utils useUserSession
every time i change import or anything i get new errors i cant seem to find where to look or what to change to get it to work
import { defineNuxtRouteMiddleware, navigateTo } from 'nuxt/app'
import { useUserSession } from 'nuxt-auth-utils'; // Correcte import

export default defineNuxtRouteMiddleware(() => {
const { loggedIn } = useUserSession()

// redirect the user to the login screen if they're not authenticated
if (!loggedIn.value) {
return navigateTo('/login')
}
})
import { defineNuxtRouteMiddleware, navigateTo } from 'nuxt/app'
import { useUserSession } from 'nuxt-auth-utils'; // Correcte import

export default defineNuxtRouteMiddleware(() => {
const { loggedIn } = useUserSession()

// redirect the user to the login screen if they're not authenticated
if (!loggedIn.value) {
return navigateTo('/login')
}
})
`
5 replies
NNuxt
Created by _Lex on 2/10/2025 in #❓・help
Updated tailiwind in my project to v4 getting error
No description
5 replies