This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema, | |
bcrypt = require('bcrypt-nodejs'), | |
SALT_WORK_FACTOR = 10, | |
// these values can be whatever you want - we're defaulting to a | |
// max of 5 attempts, resulting in a 2 hour lock | |
MAX_LOGIN_ATTEMPTS = 5, | |
LOCK_TIME = 2 * 60 * 60 * 1000; | |
var UserSchema = new Schema({ |
NewerOlder