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

This reverts commit 1177ad8b8c.
This commit is contained in:
SabreCat
2022-01-25 09:30:37 -06:00
parent 9a6b05fe67
commit b3c466ad5a
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