A
Alokai3mo ago
Rony

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
Rony
RonyOP3mo ago
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..
Vu Pham
Vu Pham3mo ago
Are there any updates?
Rony
RonyOP3mo ago
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.
Want results from more Discord servers?
Add your server