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,20 +115,16 @@ const ThirdPartyIdentityManager = (module.exports = {
to: res.email,
provider: oauthProviders[providerId].name
}
if (settings.oauthFallback) {
return callback(null, res)
} else {
EmailHandler.sendEmail(
'emailThirdPartyIdentifierLinked',
emailOptions,
error => {
if (error != null) {
logger.warn(error)
}
return callback(null, res)
EmailHandler.sendEmail(
'emailThirdPartyIdentifierLinked',
emailOptions,
error => {
if (error != null) {
logger.warn(error)
}
)
}
return callback(null, res)
}
)
} else if (retry) {
// if already retried then throw error
callback(new Error('update failed'))
@ -181,20 +177,16 @@ const ThirdPartyIdentityManager = (module.exports = {
to: res.email,
provider: oauthProviders[providerId].name
}
if (settings.oauthFallback) {
return callback(null, res)
} else {
EmailHandler.sendEmail(
'emailThirdPartyIdentifierUnlinked',
emailOptions,
error => {
if (error != null) {
logger.warn(error)
}
return callback(null, res)
EmailHandler.sendEmail(
'emailThirdPartyIdentifierUnlinked',
emailOptions,
error => {
if (error != null) {
logger.warn(error)
}
)
}
return callback(null, res)
}
)
}
}
)