# alexedwards/scs

HTTP Session Management for Go

Repository: https://github.com/alexedwards/scs
Canonical: https://ross.abutalabs.com/products/scs
Language: Go
License: MIT
License Family: permissive
Topics: go, golang, session, sessions, http, context
Last push: 2025-11-20T02:36:46+00:00

## Health v2 (maintenance only)
Score: 47/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 53, release rhythm 8, longevity 100
- inputs: {"age_days": 3677, "days_push": 287, "days_rel": 421, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2613, forks 203 (observed 2026-08-28T04:07:04.506734+00:00)

## What it is
SCS is an HTTP session management library for Go that automatically loads and saves session data via middleware. It supports 19 server-side session stores (PostgreSQL, MySQL, Redis, SQLite, and more), multiple sessions per request, flash messages, token regeneration, and idle/absolute timeouts.

## Use cases
- manage user login sessions in a Go web app
- store session data in Redis or PostgreSQL
- implement remember me functionality
- add flash messages after redirects
- regenerate session tokens to prevent fixation attacks
- handle multiple sessions per request
- replace gorilla/sessions with a faster alternative

## When to choose
- you are building Go web applications or APIs needing server-side sessions
- you want OWASP-aligned session handling with timeouts and token regeneration
- you need pluggable session stores across many databases
- performance and low memory usage matter

## When to avoid
- you need client-side (cookie-encrypted) session storage
- you are not using Go
- you need a full authentication framework with user registration and OAuth

## Facets
- artifact type: library
- maturity: stable
- function: middleware, auth, http-server, caching
- domain: web-development, backend, security, developer-tools
- platform: go, windows, cross-platform
- tags: session-management, http-sessions, session-store, flash-messages, owasp, server-side-sessions, linux, macos

## Member repositories
- alexedwards/scs (main) score 47

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:04.506734+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-30T02:20:38.231012+00:00, confidence not recorded.
  - readme: https://github.com/alexedwards/scs (fetched 2026-08-28T04:07:04.506734+00:00, sha 4ab29d8361c8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
