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:
npm install --save booker-memento
Example
var Memento = ; var memento = "secret"; var user = email: "user@gmail.com" hash: "C6XbuRC.{5}WztufMP<u*^>c8_k~"; var passwordResetToken = memento; passwordResetToken; // 1436012310:8c54cee7bef71a272a6116c5b11fa06362e5d7a7 var valid = memento; valid; // true usersalt = "123"; var valid = memento; valid; // false