# pillarjs/cookies

Signed and unsigned cookies based on Keygrip

Repository: https://github.com/pillarjs/cookies
Canonical: https://ross.abutalabs.com/products/pillarjs-cookies
Language: JavaScript
License: MIT
License Family: permissive
Topics: javascript, cookies, nodejs
Last push: 2026-06-03T11:34:15+00:00

## Health v2 (maintenance only)
Score: 61/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 85, release rhythm 8, longevity 100
- inputs: {"age_days": 5668, "days_push": 91, "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 1295, forks 157 (observed 2026-08-28T04:04:16.506500+00:00)

## What it is
A Node.js module for getting and setting HTTP(S) cookies, with optional signing to prevent tampering via Keygrip. It works with the built-in Node.js HTTP library or as Connect/Express middleware.

## Use cases
- set and get http cookies in a node.js server
- sign cookies to prevent tampering
- use cookies as express middleware
- read cookies lazily in a node http handler
- rotate cookie signing keys
- secure httponly cookies by default

## When to choose
- you need signed, tamper-proof cookies in Node.js without a full framework
- you want lightweight, lazy cookie parsing on raw Node.js HTTP
- you need Express/Connect middleware for cookie handling with key rotation

## When to avoid
- you are not on Node.js
- you only need simple unsigned cookies and prefer built-in or framework-provided cookie parsing
- you need session storage or server-side session management rather than plain cookies

## Facets
- artifact type: library
- maturity: stable
- function: http-server, middleware, security, auth
- domain: web-development, backend, security
- platform: -
- tags: cookies, keygrip, signed-cookies, express-middleware, connect-middleware, nodejs, web-server

## Member repositories
- pillarjs/cookies (main) score 61

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:16.506500+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-30T04:54:02.036567+00:00, confidence not recorded.
  - readme: https://github.com/pillarjs/cookies (fetched 2026-08-28T04:04:16.506500+00:00, sha cafe57c5058e)
  - registry_npm: https://registry.npmjs.org/cookies (fetched 2026-08-29T12:11:02.199683+00:00, sha affad5dd8cc8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
