express-user-auth
Quickly add user authentication to your Express app
- Works with any database
- Password hash stored using bcrypt
- Password reset functionality
- TODO: Login with Facebook, Twitter, Google, or Github
Install
npm i express express-user-auth
Requirements
Your createUser
and updateUser
methods must be able to save the following fields:
passwordHash
passwordAlgo
passwordResetToken
Usage
const app = // all functions are async and should return a Promiseapp app
Routes
express-user-auth
creates the following routes:
-
GET /register
-
GET /login
-
GET /forgot-password
-
GET /reset-password
-
POST /register
-
POST /login
-
POST /send-password-reset
-
POST /reset-password
Screenshots
You get this UI out of the box:




