{"repo":"vvo/iron-session","free":true,"listed":false,"github":"https://github.com/vvo/iron-session","clone":"git clone https://github.com/vvo/iron-session.git","description":"🛠 Secure, stateless, and cookie-based session library for Next.js or any JavaScript framework","language":"TypeScript","stars":4138,"topics":["nextjs","authentication","session","stateless","cookies","expressjs","nodejs","serverless"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"iron-session iron-session is a secure, stateless, and cookie-based session library for JavaScript. --- The session data is stored in signed and encrypted cookies which are decoded by your server code in a stateless fashion (= no network involved). This is the same technique used by frameworks like Ruby On Rails. Online demo and examples: https://get-iron-session.vercel.app 👀 Featured in the Next.js documentation ⭐️ Table of Contents - Table of Contents - Installation - Usage - Examples - Project status - Session options - API - getIronSession (req, res, sessionOptions): Promise - getIronSession (cookieStore, sessionOptions): Promise - session.save(): Promise - session.destroy(): void - session.updateConfig(sessionOptions: SessionOptions): void - sealData(data: unknown, { password, ttl }): Promise - unsealData (seal: string, { password, ttl }): Promise - FAQ - Why use pure cookies for sessions? - How to invalidate sessions? - Can I use something else than cookies? - How is this different from JWT? - Credits - Good Reads Installation Usage We have extensive examples here too: https://get-iron-session.vercel.app/. To get a session, there's a single method to know: getIronSession . Examples We have many different patterns and examples on the online demo, have a look: https://get-iron-session.vercel.app/. Project status ✅ Production ready and maintained. Session options Two options are required: password and cookieName . Everything else is automatically computed and usually doesn","default_branch":null,"files":null,"tree":[],"storefront":"/r/vvo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vvo/iron-session/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}