# expressjs/session

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/expressjs-session).**

6,364 stars · 997 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/expressjs/session
- awesome-repositories: https://awesome-repositories.com/repository/expressjs-session.md

## Topics

`expressjs` `javascript` `middleware` `nodejs` `session`

## Description

This is a server-side session manager and middleware for Express applications. It maintains persistent user state across multiple HTTP requests by linking a unique session identifier stored in a browser cookie to data stored on the server.

The project utilizes a standardized session store interface, allowing the connection of session data to external databases or in-memory caches. It includes mechanisms for session fixation protection through the regeneration of session identifiers.

The system covers the management of user sessions, including the configuration of session cookies, the ability to destroy session data, and the synchronization of in-memory state with a backing store.

## Tags

### Web Development

- [Session Management Middleware](https://awesome-repositories.com/f/web-development/session-management-middleware.md) — Provides a complete server-side session manager and middleware for Express applications to maintain persistent user state.
- [Session Management Systems](https://awesome-repositories.com/f/web-development/session-management-systems.md) — Stores user data on the server and links it to a client using a unique identifier kept in a cookie. ([source](https://github.com/expressjs/session#readme))
- [Server-Side State Persistence](https://awesome-repositories.com/f/web-development/server-side-state-persistence.md) — Saves user information across multiple HTTP requests to maintain a continuous state for visitors.
- [Server-Side Session Destruction](https://awesome-repositories.com/f/web-development/browser-session-managers/session-data-clearing/server-side-session-destruction.md) — Removes session information from the server store and clears the session property from the active request. ([source](https://github.com/expressjs/session#readme))
- [Cookie Attribute Control](https://awesome-repositories.com/f/web-development/cookie-management/cookie-storage-management/cookie-attribute-control.md) — Provides control over cookie attributes such as domain and security flags for session identifiers. ([source](https://github.com/expressjs/session#readme))

### Data & Databases

- [Session Data Stores](https://awesome-repositories.com/f/data-databases/in-memory-session-stores/relational-database-session-stores/user-and-session-hierarchies/session-data-stores.md) — Implements server-side session management for Express.js, linking cookies to stored user data. ([source](https://github.com/expressjs/session/blob/master/README.md))
- [External Session Store Integration](https://awesome-repositories.com/f/data-databases/in-memory-session-stores/relational-database-session-stores/user-and-session-hierarchies/session-data-stores/external-session-store-integration.md) — Connects Express.js applications to external databases or memory caches to persist session data.
- [Pluggable Session Stores](https://awesome-repositories.com/f/data-databases/in-memory-session-stores/relational-database-session-stores/user-and-session-hierarchies/session-data-stores/pluggable-session-stores.md) — Connects to external databases or memory caches using a standard interface to persist session information. ([source](https://github.com/expressjs/session#readme))
- [Cookie-Based Stores](https://awesome-repositories.com/f/data-databases/key-value-persistence-stores/shared-state-persisters/cookie-based-stores.md) — Links clients to server-side data using unique session identifiers stored in browser cookies.
- [Session Store Interfaces](https://awesome-repositories.com/f/data-databases/session-store-interfaces.md) — Provides a standardized session store interface to connect session data to external databases or in-memory caches.
- [Custom Storage Implementations](https://awesome-repositories.com/f/data-databases/hybrid-memory-stores/custom-storage-implementations.md) — Allows developers to create custom storage backends by implementing a required set of methods. ([source](https://github.com/expressjs/session/blob/master/README.md))
- [In-Memory Session Stores](https://awesome-repositories.com/f/data-databases/in-memory-session-stores.md) — Provides a high-performance in-memory store to track session state changes before flushing them to a backing store.
- [Server-Side Session Stores](https://awesome-repositories.com/f/data-databases/session-state-management/server-side-session-stores.md) — Provides mechanisms to manually write the current in-memory session state back to the server store. ([source](https://github.com/expressjs/session/blob/master/README.md))

### Security & Cryptography

- [Server-Side Session Stores](https://awesome-repositories.com/f/security-cryptography/identity-access-management/session-management/server-side-session-stores.md) — Provides a server-side session manager for Express applications that links client cookies to stored user data.
- [Session ID Regenerators](https://awesome-repositories.com/f/security-cryptography/identity-access-management/session-management/session-identifiers/session-id-regenerators.md) — Protects against session fixation attacks by replacing the current session identifier with a new one while preserving data.
- [Session Authentication](https://awesome-repositories.com/f/security-cryptography/session-authentication.md) — Manages secure session state and provides mechanisms to regenerate identifiers to protect authenticated users. ([source](https://github.com/expressjs/session#readme))
- [Session Fixation Protections](https://awesome-repositories.com/f/security-cryptography/identity-access-management/session-management/session-identifiers/session-fixation-protections.md) — Implements session identifier regeneration to protect users against session fixation attacks.
- [Web Application Security](https://awesome-repositories.com/f/security-cryptography/web-application-security.md) — Tracks user identities through secure session identifiers to manage login states and protected page access.

### Software Engineering & Architecture

- [Store-Interface Abstractions](https://awesome-repositories.com/f/software-engineering-architecture/store-interface-abstractions.md) — Decouples session management from storage using a standardized set of methods for saving and retrieving data.
- [Request Interception Middleware](https://awesome-repositories.com/f/software-engineering-architecture/request-interception-middleware.md) — Intercepts incoming HTTP requests to load session state before they reach route handlers.

### Networking & Communication

- [Request State Injections](https://awesome-repositories.com/f/networking-communication/request-state-injections.md) — Attaches session data objects directly to the request cycle for access across middleware and routes.
