mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-10 12:20:55 +00:00
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:
parent
6e09af6fbe
commit
e33ad09802
1 changed files with 18 additions and 26 deletions
|
@ -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)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue