aboutsummaryrefslogtreecommitdiff
path: root/src/server/authentication/models/user_model.ts
diff options
context:
space:
mode:
authorkimdahey <claire_kim1@brown.edu>2020-01-16 11:31:41 -0500
committerkimdahey <claire_kim1@brown.edu>2020-01-16 11:31:41 -0500
commit6be0e19ed0bd13f3796f542affa5a2e52674650c (patch)
tree1be222ea9341ecd8020fad3149035fa650a8a07f /src/server/authentication/models/user_model.ts
parent5cde81d8c6b4dcd8d0796f8669b668763957f395 (diff)
parente410cde0e430553002d4e1a2f64364b57b65fdbc (diff)
merged w master
Diffstat (limited to 'src/server/authentication/models/user_model.ts')
-rw-r--r--src/server/authentication/models/user_model.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/authentication/models/user_model.ts b/src/server/authentication/models/user_model.ts
index cc670a03a..78e39dbc1 100644
--- a/src/server/authentication/models/user_model.ts
+++ b/src/server/authentication/models/user_model.ts
@@ -73,7 +73,11 @@ userSchema.pre("save", function save(next) {
});
const comparePassword: comparePasswordFunction = function (this: DashUserModel, candidatePassword, 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;