Set Cookie Question
We are using the following packages:
- "@vue-storefront/magento-api": "^5.0.0",
- "@vue-storefront/sdk": "^3.1.0",
- @vue-storefront/magento-api": "^5.0.0",
- @vue-storefront/middleware": "^4.2.0",
Now we are trying to use the "generateCustomerToken" function, but the middleware is not setting cookies at all, and we can't seem to find the related docs on this topic.
Does anyone know how to work on this?
3 Replies
I can see that some docs indicate that we need to save the VSF customer cookie, but can't find any docs related to that..
Are there any updates?
Well we tried to extend the generateCustomerToken in middleware directly to set the cookie from middleware and then it worked.
Seems like the "get cookie" function (including extract the token out of it and send to Magento) is working fine in the default package, but we need to implement the "set-cookie" part on our own, plus will need to do some work on the frontend part to let frontend knows someone is logged in.