# vvo/iron-session

🛠 Secure, stateless, and cookie-based session library for Next.js or any JavaScript framework

Repository: https://github.com/vvo/iron-session
Canonical: https://ross.abutalabs.com/products/iron-session
Homepage: https://get-iron-session.vercel.app
Language: TypeScript
License: MIT
License Family: permissive
Topics: nextjs, authentication, session, stateless, cookies, expressjs, nodejs, serverless
Last push: 2026-04-23T13:55:54+00:00

## Health v2 (maintenance only)
Score: 58/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 78, release rhythm 8, longevity 100
- inputs: {"age_days": 2372, "days_push": 132, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4138, forks 255 (observed 2026-08-28T04:08:36.253135+00:00)

## What it is
iron-session is a secure, stateless, cookie-based session library for JavaScript, storing session data in signed and encrypted cookies decoded server-side without any network or database calls. It works with Next.js, Express, Node.js, and serverless environments.

## Use cases
- manage user sessions in a Next.js app
- store session data in encrypted cookies without a database
- add stateless authentication sessions to an Express server
- implement login sessions in serverless functions
- replace JWT-based session handling with encrypted cookies
- handle sessions in Next.js app router with server actions

## When to choose
- you want stateless sessions with no database or network overhead
- you're building with Next.js, Express, or Node.js and need cookie-based sessions
- you deploy to serverless platforms where server-side session storage is awkward
- you want the Rails-style encrypted cookie session approach in JavaScript

## When to avoid
- you need to invalidate sessions server-side instantly or store large session payloads
- you require server-side session revocation or shared session state across services
- you need a full authentication solution with OAuth, MFA, or user management

## Facets
- artifact type: library
- maturity: active
- function: auth, cryptography, middleware
- domain: web-development, backend, security
- platform: serverless
- tags: nextjs, cookies, session-management, stateless, express, encryption, authentication, nodejs, web-server, javascript

## Member repositories
- vvo/iron-session (main) score 58

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:36.253135+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:23:00.712637+00:00, confidence not recorded.
  - readme: https://github.com/vvo/iron-session (fetched 2026-08-28T04:08:36.253135+00:00, sha 9e37fb8a5471)
  - homepage: https://get-iron-session.vercel.app (fetched 2026-08-29T09:14:19.612208+00:00, sha 9428fe76184e)
  - registry_npm: https://registry.npmjs.org/iron-session (fetched 2026-08-29T09:14:19.614833+00:00, sha 91dbd71c54ae)
- Data as of 2026-08-30T08:39:29.467469+00:00.
