fix(auth): revert attempted perf tweak

This commit is contained in:
Kalista Payne
2026-01-07 17:52:33 -06:00
parent 7379c7b230
commit 5c555cbf88
+2 -4
View File
@@ -82,10 +82,8 @@ export async function loginSocial (req, res) { // eslint-disable-line import/pre
}
if (!existingUser && email) {
existingUser = await User.findOne(
{ 'auth.local.email': email },
{ auth: 1 },
).exec();
// TODO we load the whole user object here. Is that necessary?
existingUser = await User.findOne({ 'auth.local.email': email }).exec();
}
if (!allowRegister && !existingUser) {