Open rudolfbyker opened 7 months ago
Workaround: Specify this everywhere:
persistedState.cookiesWithOptions({
sameSite: "strict",
})
instead of
persistedState.cookies
Should be fixed and working in v4
This does not seem to work in v4 either. See https://stackblitz.com/edit/github-5b43sb-n4cbn9?file=nuxt.config.ts
With v4, you dont need the @pinia-plugin-persistedstate/nuxt
package, as the nuxt module is included in the base package. You can refer to this https://prazdevs.github.io/pinia-plugin-persistedstate/frameworks/nuxt.html#installation
Describe the bug
When using the exact config from the docs https://prazdevs.github.io/pinia-plugin-persistedstate/frameworks/nuxt-3.html#global-options , where stores use localStorage by default, but some stores are explicitly set to use
persist: { storage: persistedState.cookies },
, then thecookieOptions
seems to be ignored in the stores that use cookies. I still get cookies withSecure:false
andSameSite:"None"
for those stores.Reproduction
https://stackblitz.com/edit/github-5b43sb
System Info
Used Package Manager
npm
Validations