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.
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.