koajs / session

Simple session middleware for koa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Encrypted cookie

ioness opened this issue · comments

Hello!

Would it be a good idea to save cookies encrypted ?

Cheers

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

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

Pull request created for this feature request: #182

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.