Uzyxen
middleware
I created a middleware in which I send an api request and validate the JWT token. In the vue app I have a token download from the serwer.
App.vue
in composables I have useAuth.js with:
And id middleware authUser.ts:
My problem is that during SSR the "token.value" is undefined so even if user is logged he will be navigated to /login page.
10 replies
$fetch from client vs from server
I've got a problem with $fetch in Nuxt.js with ASP.NET. When i use $fetch (method: 'delete' straight straight from client it ends with the error "BLOCKED_BY_CLIENT" but when I send api request to the nitro endpoint and then request to ASP.NET it works. Could someone explain to me why?
11 replies