- Use koa-session, but encrypted.
options
will pass to koa-session
const session = require('crypto-session')
const app = require('koa')()
session(app, {
crypto_key: 'exiKdyF+IwRIXJDmtGIl4vWUz4i3eVSISpfZoeYc0s4='
})
Generate a new crypto_key (note, the length depends on your algorithm):
$ node
> crypto.randomBytes(32).toString('base64')
MIT