# express-session-passport-cleanup

> Clean up after passport when using it with express-session

Latest version **1.0.3** (published 2015-08-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install express-session-passport-cleanup
pnpm add express-session-passport-cleanup
yarn add express-session-passport-cleanup
bun add express-session-passport-cleanup
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2015-08-25 |
| First published | 2015-05-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Wes Todd |
| Maintainers | wesleytodd |
| Keywords | express, express-session, passport, middleware |

## Links

- npm: https://www.npmjs.com/package/express-session-passport-cleanup
- Repository: https://github.com/wesleytodd/express-session-passport-cleanup
- Issues: https://github.com/wesleytodd/express-session-passport-cleanup/issues
- npm.io page: https://npm.io/package/express-session-passport-cleanup

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@oxyhq/services](https://npm.io/package/@oxyhq/services.md) — 2.3K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2015-08-25
- 1.0.2 — 2015-08-07
- 1.0.1 — 2015-06-30
- 1.0.0 — 2015-05-24

## README

# Don't Create Anymore Empty Sessions

There is this silly issue where [passport](http://passportjs.org) modifies the session causing [express-session](https://github.com/expressjs/session) to create a bunch of extra sessions.  This module fixes that by using a method similar to that recommended by [@Joris-van-der-Wel](https://github.com/Joris-van-der-Wel) [here](https://github.com/jaredhanson/passport/issues/279#issuecomment-69839937).  This module instead overrides the end method on res, becuase either things have changed in `express-session` or that solution never worked correctly.

## Install

```
$ npm install --save express-session-passport-cleanup
```

## Usage

```javascript
var expressSessionPassportCleanup = require('express-session-passport-cleanup');

app.use(session({/* ... */}));
// Include it right after the express session middleware
app.use(expressSessionPassportCleanup);
app.use(passport.initialize());
app.use(passport.session());
```

---
_Source: https://npm.io/package/express-session-passport-cleanup · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
