@tpp/um

2.0.0 • Public • Published

UM - User Management

This module helps handle user management (not for public release*)

icon

What it does

  1. Track
    1. Id (Transient User)
  2. Sign Up
    1. Id (Demo User)
    2. Name / Email / Password
      1. Optional Old Id
  3. Login
    1. Email / Password
    2. Id (Demo User)
  4. Change Password
    1. Old Password
    2. Token
  5. Verify Email
    1. Token
  6. Manage Profile
    1. Profile Picture
    2. Address
    3. Sex
    4. Goals
    5. Social Links
    6. 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) => ...)

Readme

Keywords

none

Package Sidebar

Install

npm i @tpp/um

Weekly Downloads

1

Version

2.0.0

License

UNLICENSED

Unpacked Size

78.1 kB

Total Files

18

Last publish

Collaborators

  • tpp