clean up logging, problem solved

This commit is contained in:
lingdocs 2021-09-16 10:58:46 -04:00
parent 16b5fa45ee
commit 1180401d81
1 changed files with 0 additions and 2 deletions

View File

@ -79,10 +79,8 @@ function setupPassport(passport: PassportStatic) {
if (user) return done (null, user);
// if the person used their google email for a plain signup, add the google provider to it and sign in
const googleMail = getEmailFromGoogleProfile(gProfile);
console.log("google mail is", googleMail.email)
if (googleMail.email) {
const otherAccountWSameEmail = await getLingdocsUser("email", googleMail.email);
console.log("user with same gmail email:", otherAccountWSameEmail?.name);
if (otherAccountWSameEmail) {
await updateLingdocsUser(otherAccountWSameEmail.userId, { google: gProfile });
return done(null, otherAccountWSameEmail);