Can't access cookie, returning undefined
I am trying to access a cookie but its returning undefined for the value, and cant find the Issue.
My code looks pretty simple so far:
token undefined, app.vue:4When looking into dev tools of my browser, the cookie is set and not expired - does anyone has a idea what's the issue here?
3 Replies
Can you provide a reproduction? just tried this in a new project and as soon as the cookie has been set once it shows up in the log as expected
can u even access httponly cookies in javascript?
Oh wow, thats it......
Thanks @Cake, was because of the http only, I am a noob in cookies - so I thought it means its to allow the usage on http sites without certs, seems like it isn't :Yep:
I removed the flag, and now its accessible