A
Alokai•2y ago
Yatharth

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
rohrig
rohrig•2y ago
hi @Yatharth 👋 , what version of vue-storefront/core do you have?
Yatharth
YatharthOP•2y ago
2.5.4
rohrig
rohrig•2y ago
please try upgrading to :
@vue-storefront/core: "~2.7.5"
"@vue-storefront/middleware": "~2.7.5",
"@vue-storefront/nuxt": "~2.7.5",
"@vue-storefront/nuxt-theme": "~2.7.5",
@vue-storefront/core: "~2.7.5"
"@vue-storefront/middleware": "~2.7.5",
"@vue-storefront/nuxt": "~2.7.5",
"@vue-storefront/nuxt-theme": "~2.7.5",
Yatharth
YatharthOP•2y ago
will it create any issues in my existing code? like any dependency issue? @rohrig ?
rohrig
rohrig•2y ago
I just tried it in another project and everything appeared to work fine. You should test things on your own to be sure
Yatharth
YatharthOP•2y ago
okay thanks can you explain like why is this issue happening for my future understanding? @rohrig
rohrig
rohrig•2y ago
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.
Yatharth
YatharthOP•2y ago
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
rohrig
rohrig•2y ago
can you provide a minimal reproduction?
Yatharth
YatharthOP•2y ago
I don't know how to do that please explain a little on how to create a minimal reproduction
rohrig
rohrig•2y ago
create a public repo with the minimum amount of code you need to demonstrate the issue. 😄 then provide the link here
Yatharth
YatharthOP•2y ago
oh okay
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?