I have simple pinia store for auth and a middleware to verify if the user is logged in. But, the middleware dosen't work when I refresh the page.
the code goes here: https://pastebin.com/n16hfNab
What can I do to store the token, in nuxt2 I used localStoare. But it seems dosen't work in pinia. I am using SSR.
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.