Encrypted cookie
ioness opened this issue · comments
ioness commented
Hello!
Would it be a good idea to save cookies encrypted ?
Cheers
Yiyu He commented
hmmm, I'd like to add encryted cookie in koa, I'll do it when I'm free.
ioness commented
How exciting!
I found this lib.
https://github.com/nicokaiser/koa-encrypted-session
It uses koa-sessions options ( encode & decode ) to encrypt/decrypt the cookie
Nico Kaiser commented
As @ioness already wrote, there is the koa-encrypted-session module that simply provides encode/decode function for koa-session. It is opinionated (i.e. it uses libsodium for encryption and does not let you choose the algorithm), but that way it can be simple and secure.