nuxt/nuxt

support getter for `expires` option to `useCookie` (to allow updating when re-setting the cookie value)

Open

#20.652 geöffnet am 3. Mai 2023

Auf GitHub ansehen
 (3 Kommentare) (7 Reaktionen) (0 zugewiesene Personen)TypeScript (60.221 Stars) (5.607 Forks)batch import
good first issue🍰 p2-nice-to-have

Beschreibung

Describe the feature

const token = useCookie('token', { expires: 'Wed May 03 2023 20:38:30 GMT+0700 (Indochina Time)' })

If I assign a new value for the token, I would like to set a new expires time for the new cookie too.

Is there any way to do this without calling new useCookie() statement?

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

Contributor Guide