fastify / fastify-cookie

A Fastify plugin to add cookies support
MIT License
249 stars 64 forks source link

Why is there automatic cookie signing? #287

Open gabor-s opened 3 months ago

gabor-s commented 3 months ago

Prerequisites

Issue

If I set a cookie with setCookie and I configured this plugin with signed: true then the cookie will be automatically signed. However when I read the cookie there's no automatic unsigning, I have to do it manually by calling unsignCookie. What is the reasoning behind this imbalanced behavior?

mcollina commented 3 months ago

Thanks for reporting!

Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that.