-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Cookies: can't read for SPA #17804
Copy link
Copy link
Closed as not planned
Labels
Qv2 🔝Quasar v2 issuesQuasar v2 issuesarea/cliarea/componentsbug/0-needs-infoNeed more info to reproduceNeed more info to reproduceflavour/quasar-cli-vitekind/bug 🐞
Description
What happened?
Hello ! I'm trying to access a cookie from the SPA mode without a success 🙄 .
I followed your docs and have the following code:
const $q = useQuasar()
const allCookies = $q.cookies.getAll()
const cookie = $q.cookies.get(sessionCookie)
console.log(`*** session cookie is set: ${JSON.stringify(allCookies)}`)
console.log(`*** cookie: ${cookie}`)Is there anything I'm doing wrong with this ? 🤔
Quasar -
What did you expect to happen?
Cookies can be accessed
Reproduction URL
How to reproduce?
- Setup a basic SPA app
- Set Cookies with the backend
- Try to access cookies from a Vue component
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite), Components (quasar)
Platforms/Browsers
Chrome
Quasar info output
Operating System Linux(6.8.0-52-generic) - linux/x64
NodeJs 22.9.0
Global packages
NPM 11.0.0
yarn Not installed
pnpm 9.15.4
bun Not installed
@quasar/cli 2.4.1
@quasar/icongenie Not installed
cordova Not installed
Networking
Host lap
wlp0s20f3 192.168.0.12
br-770db3a45ab6 172.18.0.1Relevant log output
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Qv2 🔝Quasar v2 issuesQuasar v2 issuesarea/cliarea/componentsbug/0-needs-infoNeed more info to reproduceNeed more info to reproduceflavour/quasar-cli-vitekind/bug 🐞
