session icon indicating copy to clipboard operation
session copied to clipboard

Encrypted cookie

Open ioness opened this issue 6 years ago • 4 comments

Hello!

Would it be a good idea to save cookies encrypted ?

Cheers

ioness avatar Aug 05 '19 23:08 ioness

hmmm, I'd like to add encryted cookie in koa, I'll do it when I'm free.

dead-horse avatar Aug 06 '19 03:08 dead-horse

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

ioness avatar Aug 06 '19 12:08 ioness

Pull request created for this feature request: #182

jmitchell38488 avatar Aug 19 '19 12:08 jmitchell38488

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.

nicokaiser avatar Dec 05 '19 22:12 nicokaiser