aboutsummaryrefslogtreecommitdiff
path: root/src/server/authentication/models/user_model.ts
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-12-10 17:42:44 -0500
committerSam Wilkins <samwilkins333@gmail.com>2019-12-10 17:42:44 -0500
commit096718ee546afbd7568bf8ec9e23dca0556d814d (patch)
tree484e9890a18c9d5e1addbe517610bfa3b9ea2451 /src/server/authentication/models/user_model.ts
parent50d351d4178297eba0c917fb3a1959a073127c44 (diff)
parentfe06511da85a9483c10353f0cc5d54b70a265079 (diff)
merged
Diffstat (limited to 'src/server/authentication/models/user_model.ts')
-rw-r--r--src/server/authentication/models/user_model.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server/authentication/models/user_model.ts b/src/server/authentication/models/user_model.ts
index 0bb89772a..78e39dbc1 100644
--- a/src/server/authentication/models/user_model.ts
+++ b/src/server/authentication/models/user_model.ts
@@ -73,8 +73,11 @@ userSchema.pre("save", function save(next) {
});
const comparePassword: comparePasswordFunction = function (this: DashUserModel, candidatePassword, cb) {
- return cb(null, true);
- // bcrypt.compare(candidatePassword, this.password, cb);
+ // Choose one of the following bodies for authentication logic.
+ // secure
+ bcrypt.compare(candidatePassword, this.password, cb);
+ // bypass password
+ // cb(undefined, true);
};
userSchema.methods.comparePassword = comparePassword;