etherCorps / SK-Redis-SessionManager

Redis integration in SvelteKit for Session Management
https://sk-vercel-ioredis.vercel.app/
MIT License
25 stars 3 forks source link

Update cookie data #1

Closed thiagomagro closed 1 year ago

thiagomagro commented 1 year ago

Whats the recommended way to update the data inside the cookie? Should we just create a new one with the updated data?

Thanks!

theetherGit commented 1 year ago

For now you can assign new cookie to user but we can in introduce in method to update data. Code for update method: async updateCookieData (key, data) { // check for key in redis if exist update the data and then update cookies. }

theetherGit commented 1 year ago

I have added updateCookieData method so now you can use it for update data in redis. Check examples: routes/api/updateCookieData for more.