vvo / iron-session

🛠 Secure, stateless, and cookie-based session library for JavaScript

Home Page:https://get-iron-session.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feature request, memory store

ZehuaZhang opened this issue · comments

How would I go about use iron session with a redis store?

Hey @ZehuaZhang , did you ever end up solving this?

Hey @ZehuaZhang , did you ever end up solving this?

Unfortunately no

Hi guys 👋 Based on my reading of the docs on NPM, this isn't possible - the session state is stored inside the encrypted session cookie. So, it's not possible to use an external memory store, because there isn't an internal one. It works kind of similar to JWT.

on most browsers, you're limited to 4,096 bytes per cookie. To give you an idea, an iron-session cookie containing {user: {id: 100}} is 265 bytes signed and encrypted: still plenty of available cookie space in here.