color-mode icon indicating copy to clipboard operation
color-mode copied to clipboard

feat: add cookie attributes

Open tasiotas opened this issue 1 year ago β€’ 4 comments

πŸ”— Linked issue

none

❓ Type of change

  • [ ] πŸ“– Documentation (updates to the documentation or readme)
  • [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
  • [x] πŸ‘Œ Enhancement (improving an existing functionality)
  • [ ] ✨ New feature (a non-breaking change that adds functionality)
  • [ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

I added cookieAttribsto the module config. This allows to specify any cookie attribute for further configuration. Now we can specify path, domain etc. so that color-mode works across subdomains.

Thank you

tasiotas avatar Nov 03 '24 19:11 tasiotas

Deploy Preview for nuxt-color-mode canceled.

Name Link
Latest commit 9978f41d69f44f84d11235e0ce52e641f0646e49
Latest deploy log https://app.netlify.com/sites/nuxt-color-mode/deploys/67ed77c304e40400083f0707

netlify[bot] avatar Nov 03 '24 19:11 netlify[bot]

May i ask to improve naming? Would be nice to use cookieAttributes insted of cookieAttribs since there is no otrher abbreviations or atleast cookieAttrs since it's canonical abbreviation for attributes.

zumm avatar Jan 22 '25 05:01 zumm

I'm wondering, I don't think domain is very useful though, but what about just forcing the path to be / to it applies to all the website by default?

atinux avatar Apr 02 '25 17:04 atinux

any updates?

mdotme avatar Jun 02 '25 06:06 mdotme

lgtm, tried locally with the cookieAttrs changes and that pesky "Some cookies are misusing the recommended β€œSameSiteβ€œ attribute" is gone

velvetcode206 avatar Jul 17 '25 05:07 velvetcode206

partial support landed via https://github.com/nuxt-modules/color-mode/pull/320, but we can iterate here to allow configuration

danielroe avatar Nov 11 '25 16:11 danielroe