Commit bfcec5a9 authored by NGPixel's avatar NGPixel

Fix auth fail when using uppercase in email

parent 80aa3000
......@@ -115,7 +115,7 @@ router.post('/users/create', (req, res) => {
}
let nUsr = {
email: _.trim(req.body.email),
email: _.toLower(_.trim(req.body.email)),
provider: _.trim(req.body.provider),
password: req.body.password,
name: _.trim(req.body.name)
......
......@@ -59,6 +59,7 @@ userSchema.statics.processProfile = (profile) => {
}
profile.provider = _.lowerCase(profile.provider)
primaryEmail = _.toLower(primaryEmail)
return db.User.findOneAndUpdate({
email: primaryEmail,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment