From e33ad09802a591807e20177203fe66f75981cf91 Mon Sep 17 00:00:00 2001 From: Jessica Lawshe Date: Thu, 11 Jul 2019 12:04:08 -0500 Subject: [PATCH] Merge pull request #1972 from overleaf/jel-remove-oauth-email-settings-check Remove oauthFallback check for OAuth emails GitOrigin-RevId: 85b7e007df0c48212cca98f5253c588e9f39802a --- .../User/ThirdPartyIdentityManager.js | 44 ++++++++----------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/services/web/app/src/Features/User/ThirdPartyIdentityManager.js b/services/web/app/src/Features/User/ThirdPartyIdentityManager.js index 8886688981..c2588aeff5 100644 --- a/services/web/app/src/Features/User/ThirdPartyIdentityManager.js +++ b/services/web/app/src/Features/User/ThirdPartyIdentityManager.js @@ -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) + } + ) } } )