Revert "Revert "Revert "Prerequisites to removing Facebook authentication (#13683)"""

This reverts commit e3ffd7acbc.
This commit is contained in:
SabreCat
2022-01-31 14:52:22 -06:00
parent a2f50815d8
commit de477ebb4a
12 changed files with 72 additions and 288 deletions

View File

@@ -341,14 +341,7 @@ api.resetPassword = {
if (validationErrors) throw validationErrors;
const email = req.body.email.toLowerCase();
const user = await User.findOne({
$or: [
{ 'auth.local.email': email },
{ 'auth.apple.emails.value': email },
{ 'auth.google.emails.value': email },
{ 'auth.facebook.emails.value': email },
],
}).exec();
const user = await User.findOne({ 'auth.local.email': email }).exec();
if (user) {
// create an encrypted link to be used to reset the password