# gin-contrib/sessions

Gin middleware for session management

Repository: https://github.com/gin-contrib/sessions
Canonical: https://ross.abutalabs.com/products/gin-contrib-sessions
Language: Go
License: MIT
License Family: permissive
Last push: 2026-08-15T04:32:27+00:00

## Health v2 (maintenance only)
Score: 82/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 53, longevity 100
- inputs: {"age_days": 3584, "days_push": 18, "days_rel": 158, "gap_med": 101, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1569, forks 203 (observed 2026-08-28T04:05:05.230196+00:00)

## What it is
A Gin middleware package for session management in Go web applications, supporting multiple backends including cookie-based, Redis, memcached, MongoDB, GORM, memstore, PostgreSQL, and filesystem stores. It provides a simple API for single and multiple named sessions per request.

## Use cases
- manage user sessions in a gin web app
- store session data in redis for a go server
- cookie-based sessions for gin api
- multiple named sessions per request in gin
- persist sessions to postgres or mongodb
- login state management for go web application

## When to choose
- you use the Gin framework and need session handling
- you want pluggable session backends (redis, cookie, database, filesystem)
- you need multiple independent sessions per request

## When to avoid
- you use a framework other than Gin
- you need distributed session locking or advanced session features
- you build non-HTTP Go applications

## Facets
- artifact type: library
- maturity: stable
- function: middleware, auth, web-framework
- domain: web-development, backend, developer-tools
- platform: go, cross-platform
- tags: gin, session-management, session-store, cookie-store, redis, memcached, mongodb, gorm, postgresql, filesystem, web-server

## Member repositories
- gin-contrib/sessions (main) score 82

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:05.230196+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-30T03:58:52.861845+00:00, confidence not recorded.
  - readme: https://github.com/gin-contrib/sessions (fetched 2026-08-28T04:05:05.230196+00:00, sha bb43b22d6417)
- Data as of 2026-08-30T08:39:29.467469+00:00.
