I am using vue-cookie to set userId in cookies. On login I set a userId cookie but it does not show it in my data layer until I refresh the page. It does not even show me that the cookie is in my cookies storage.
I am using SPA so if anyone knows a work around kindly suggest as I do not want to refresh my page.
Inside your login API call please do the following, first, install package from https://www.npmjs.com/package/vue-cookies. after that when you receive user object from API call you can do the following.
Inside your store You can do following