A
Alokai12mo ago
ALI

VSF2-Nuxt3 app integrated with Magento 2.

I have a vuestorefront 2 application extended with Nuxt and integrated with Magento 2. I was working on SignUp and Login functionality and storing the token from generateCustomerToken method to localStorage. Works perfectly fine but when I try place Guarded Routes and try to access that guarded route directly by typing url, it gives me 500 saying 'localStorage is not defined'. It should redirect me to Login page. Below are the screenshots if someone could look into them and suggest a solution.
No description
No description
No description
No description
No description
No description
1 Reply
ALI
ALI12mo ago
okay, this post has direct relation with my last one. It seems localStorage is not available on server side. So, we are recommended by the docs to use vsf-customer to store cookies. So far, I have only been able to figure out that I need to have it registered in middleware.config.ts file. What next?
Want results from more Discord servers?
Add your server