# booker-memento

> *Memento is a module that handles the creation and verification of ephemeral tokens. It is really useful for password reset and email activation features.*

Latest version **1.0.1** (published 2015-07-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install booker-memento
pnpm add booker-memento
yarn add booker-memento
bun add booker-memento
```

## 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.1 |
| Published | 2015-07-04 |
| First published | 2015-07-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Alex Booker |
| Maintainers | alexbooker |

## Links

- npm: https://www.npmjs.com/package/booker-memento
- Repository: https://github.com/alexbooker/memento
- Issues: https://github.com/alexbooker/memento/issues
- npm.io page: https://npm.io/package/booker-memento

## Dependencies (1)

- [moment](https://npm.io/package/moment.md) ^2.10.3

## Recent versions

- 1.0.1 (latest) — 2015-07-04
- 1.0.0 — 2015-07-04

## README

*Memento is a module that handles the creation and verification of ephemeral tokens. It is really useful for password reset and email activation features.*

##Installation

Memento is available on [npm](https://www.npmjs.com/package/booker-memento):

```
npm install --save booker-memento
```

##Example

```javascript
var Memento = require("booker-memento");

var memento = new Memento("secret");

var user = {
  email: "user@gmail.com",
  hash: "C6XbuRC.{5}WztufMP<u*^>c8_k~"
};

var passwordResetToken = memento.createToken(user);

passwordResetToken; // 1436012310:8c54cee7bef71a272a6116c5b11fa06362e5d7a7

var valid = memento.verifyToken(user);

valid; // true

user.salt = "123";

var valid = memento.verifyToken(user, passwordResetToken);

valid; // false
```

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