Unable to access cookies in composables
context.$bagisto.config.app.$cookies.set('vsf-bagCust-token', loginResult.data.api_access_token);
my context does not have this config object and I am unable to figure out how to set this. Please help
13 Replies
hi @Yatharth π , what version of vue-storefront/core do you have?
2.5.4
please try upgrading to :
will it create any issues in my existing code?
like any dependency issue?
@rohrig ?
I just tried it in another project and everything appeared to work fine. You should test things on your own to be sure
okay thanks
can you explain like why is this issue happening for my future understanding?
@rohrig
I was working on another issue where the context was missing and updating fixed it. I think that in the updated version the cookies are added to the context where they weren't before.
oh okay
even after updating unable to get cookie
{
"$bagisto": {
"api": {},
"config": {
"axios": {
"baseURL": "http://192.168.29.159:3000/api",
"headers": {}
}
}
}
}
this is the object that I am getting when I print the context
@rohrig
can you provide a minimal reproduction?
I don't know how to do that please explain a little on how to create a minimal reproduction
create a public repo with the minimum amount of code you need to demonstrate the issue. π then provide the link here
oh okay
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View