Skip to content

Commit e54527c

Browse files
authored
fix: remove ignored assignment (#1583)
The User schema doesn't define profile.email, so Mongoose ignores it in strict mode. The email field is populated at account creation (it is required), so this line is unnecessary.
1 parent 09bcb8e commit e54527c

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

config/passport.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ async function handleAuthLogin(req, accessToken, refreshToken, providerName, par
110110

111111
user.profile.location = user.profile.location || providerProfile.location;
112112
user.profile.website = user.profile.website || providerProfile.website;
113-
user.profile.email = user.profile.email || providerProfile.email;
114113
await user.save();
115114
return user;
116115
}
@@ -150,7 +149,6 @@ async function handleAuthLogin(req, accessToken, refreshToken, providerName, par
150149

151150
user.profile.location = providerProfile.location;
152151
user.profile.website = providerProfile.website;
153-
user.profile.email = providerProfile.email;
154152
await user.save();
155153
return user;
156154
}

0 commit comments

Comments
 (0)