Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

express-forgot-password

0.4.1 • Public • Published

Forgot Password Flow

Express sub-app for a forgotton password flow.

Assumptions:

  • Mongodb / mongoose
  • User model has .findByEmail

Usage:

 
var forgotton = require('express-forgotton-password')({ 
 // None of this is optional :(
  mailConfig: config // config for nodemailer
, mailFrom: "nomail" // mailer from address
, db: mongoose
, resetMailSubject : "Reset yout mysite password"
, resetMailContent : function(user, token){ 
    return "reset link: http://mysite" + token + " \n thanks" 
  }
, user : UserModel })
app.use(forgotton.app)
 

Keywords

none

install

npm i express-forgot-password

Downloadsweekly downloads

2

version

0.4.1

license

none

last publish

collaborators

  • avatar