Lockit delete account
Delete user accounts in your Express app. The module is part of Lockit.
Installation
npm install lockit-delete-account
var DeleteAccount = ;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 DeleteAccount instancevar deleteAccount = config adapter; // use deleteAccount.router with your appapp;
Configuration
More about configuration at Lockit.
Features
- input validation
- match public phrase
- session verification
- kill current session
- remove user from db
Routes included
- GET /delete-account
- POST /delete-account
REST API
If you've set exports.rest
in your config.js
the module behaves as follows.
- all routes have
/rest
prepended GET /rest/delete-account
isnext()
ed and you can catch/delete-account
on the clientPOST /rest/delete-account
stays the same but sends JSON
Test
grunt
License
MIT