user-manager-utils

1.0.2 • Public • Published

User Manger Utils

Usage

const utils = require('user-manager-utils')

const password = 'myPass'

utils.encrypt(password).then(hash => {
  // do something with password hash
}).catch(e => {
  // do something with err
})

Or

utils.encrypt(password, (err, hash) => {
  if (err) {
    // do something with err
  }
  // do something with hash
})

API

utils.encrypt(password, [callback]) -> hash
utils.signToken(token, secret, [options], [callback]) -> token
utils.verifyToken(token, secret, [options], [callback]) -> decoded
utils.extractToken(req, [callback]) -> token

Readme

Keywords

none

Package Sidebar

Install

npm i user-manager-utils

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • glopezep