exhale

0.3.0 • Public • Published

exhale

expiring token system for ephemeral tasks such as email verification and password reset

var exhale = require("exhale")(redisClientOrConfig)

basic usage

var obj = { type: "password_reset", payload: { account: "abc" }}

exhale.set(obj, function(errors, token){
  console.log(token)
  // returns...
  {
    uuid: "18b65620-ce44-47bc-81b7-c7a96d8e6516",
    type: "password_reset",
    payload: { account: "abc" }
  }
})

exhale.get("18b65620-ce44-47bc-81b7-c7a96d8e6516", function(token){
  console.log(token)
  // returns...
  {
    uuid: "18b65620-ce44-47bc-81b7-c7a96d8e6516",
    type: "password_reset",
    payload: { account: "abc" }
  }
})

exhale.del("18b65620-ce44-47bc-81b7-c7a96d8e6516", new Function)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.3.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.3.0
    2
  • 0.2.0
    1
  • 0.1.0
    1
  • 0.0.0
    1

Package Sidebar

Install

npm i exhale

Weekly Downloads

5

Version

0.3.0

License

ISC

Last publish

Collaborators

  • sintaxi