Merge pull request #1972 from overleaf/jel-remove-oauth-email-settings-check

Remove oauthFallback check for OAuth emails

GitOrigin-RevId: 85b7e007df0c48212cca98f5253c588e9f39802a
This commit is contained in:
Jessica Lawshe 2019-07-11 12:04:08 -05:00 committed by sharelatex
parent 6e09af6fbe
commit e33ad09802

View file

@ -115,9 +115,6 @@ const ThirdPartyIdentityManager = (module.exports = {
to: res.email,
provider: oauthProviders[providerId].name
}
if (settings.oauthFallback) {
return callback(null, res)
} else {
EmailHandler.sendEmail(
'emailThirdPartyIdentifierLinked',
emailOptions,
@ -128,7 +125,6 @@ const ThirdPartyIdentityManager = (module.exports = {
return callback(null, res)
}
)
}
} else if (retry) {
// if already retried then throw error
callback(new Error('update failed'))
@ -181,9 +177,6 @@ const ThirdPartyIdentityManager = (module.exports = {
to: res.email,
provider: oauthProviders[providerId].name
}
if (settings.oauthFallback) {
return callback(null, res)
} else {
EmailHandler.sendEmail(
'emailThirdPartyIdentifierUnlinked',
emailOptions,
@ -196,7 +189,6 @@ const ThirdPartyIdentityManager = (module.exports = {
)
}
}
}
)
}
})