fix(user): Add LoopBack email validation once again

Earlier we did not need emails for everyone, this is not the case
anymore. We now require emails, and all other auth mechanisms are
now deprecated for new users.
This commit is contained in:
Mrugesh Mohapatra
2017-10-19 12:08:23 +05:30
parent fe059c224e
commit 2a3703b95a

View File

@ -83,11 +83,6 @@ function getWaitPeriod(ttl) {
return 0;
}
module.exports = function(User) {
// NOTE(berks): user email validation currently not needed but build in. This
// work around should let us sneak by
// see:
// https://github.com/strongloop/loopback/issues/1137#issuecomment-109200135
delete User.validations.email;
// set salt factor for passwords
User.settings.saltWorkFactor = 5;
// set user.rand to random number