@tpp/um
v2.0.0
Published
User Management Helper
Downloads
3
Readme
UM - User Management
This module helps handle user management (not for public release*)
What it does
- Track
- Id (Transient User)
- Sign Up
- Id (Demo User)
- Name / Email / Password
- Optional Old Id
- Login
- Email / Password
- Id (Demo User)
- Change Password
- Old Password
- Token
- Verify Email
- Token
- Manage Profile
- Profile Picture
- Address
- Sex
- Goals
- Social Links
- Roles / Features
Technology
Uses JT
API
track((badge, id) => ...);
signup((badge, id) => ...);
signup({ name, email, password, id }, (badge, id) => ...)
login({ email, password }, (badge, id) => ...)
login({badge}, (refreshed, id) => ...)
check(badge, payload => ...)
decode(badge, payload => ...) // no verification
verifyemail({email, nonce}, token => ...)
verifyemail({email, nonce, token}, ok => ...)
changepw({email, old, new}, badge => ...)
changepw({email}, token => ...)
changepw({email, token, password}, badge => ...)
get({badge}, user => ...)
get({id}, user => ...)
set({badge, info}, user => ...)
Shared Secret
Store the secret in a file and and provide it when starting up the user manager:
const um = require('um')(secretfile,...)
DB
Users are stored in a BabyDB which also should be provided on start up
const um = require('um')(secretfile, dbfile)
Errors
um.on('error', (err, rec) => ...)