forgot password middleware for lockit
Help users who forgot their passwords for your Express app. The module is part of Lockit.
npm install lockit-forgot-password
var ForgotPassword = ;var utils = ;var config = ;var db = utils;var adapter = config;var app = ;// express settings// ...// sessions are required - either cookie or some sort of dbapp;app;// create new ForgotPassword instancevar forgotPassword = config adapter;// use forgotPassword.router with your appapp;
More about configuration at Lockit.
If you've set
exports.rest in your
config.js the module behaves as follows.
next()ed and you can catch
/forgot-passwordon the client
POST /rest/forgot-passwordstays the same but sends JSON
GET /rest/forgot-password/:tokensends JSON and you can catch
/forgot-password/:tokenon the client
POST /rest/forgot-password/:tokensends JSON
$ npm test