From c2ef50f563116c5bf5e9cf2030030bf2808e4ba4 Mon Sep 17 00:00:00 2001 From: Jessica Lawshe <5312836+lawshe@users.noreply.github.com> Date: Mon, 12 Jan 2026 09:29:04 -0600 Subject: [PATCH] Merge pull request #30176 from overleaf/jel-domain-capture-email-exists [web] Show message when email from domain capture SAML callback is on another user's account GitOrigin-RevId: 24b440f368c15811cc5b18623238abcc2a88329f --- services/web/app/src/Features/Errors/Errors.js | 10 ++++++++++ services/web/locales/en.json | 1 + 2 files changed, 11 insertions(+) diff --git a/services/web/app/src/Features/Errors/Errors.js b/services/web/app/src/Features/Errors/Errors.js index 4b06d50203..05e5220399 100644 --- a/services/web/app/src/Features/Errors/Errors.js +++ b/services/web/app/src/Features/Errors/Errors.js @@ -83,6 +83,14 @@ class SAMLCommonsUnavailable extends OError { class SAMLDomainCaptureError extends OError {} +class SAMLDomainCaptureJoiningError extends SAMLDomainCaptureError {} + +class SAMLDomainCaptureEmailExistsError extends SAMLDomainCaptureJoiningError { + get i18nKey() { + return 'saml_email_on_another_account_error' + } +} + class SAMLIdentityExistsError extends OError { get i18nKey() { return 'institution_account_tried_to_add_already_registered' @@ -363,7 +371,9 @@ module.exports = { SAMLAssertionAudienceMismatch, SAMLAuthenticationRequiredError, SAMLCommonsUnavailable, + SAMLDomainCaptureEmailExistsError, SAMLDomainCaptureError, + SAMLDomainCaptureJoiningError, SAMLIdentityExistsError, SAMLAlreadyLinkedError, SAMLEmailNotAffiliatedError, diff --git a/services/web/locales/en.json b/services/web/locales/en.json index e37a7fc837..ebdcab8e11 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -2007,6 +2007,7 @@ "saml_create_admin_instructions": "Choose an email address for the first __appName__ admin account. This should correspond to an account in the SAML system. You will then be asked to log in with this account.", "saml_email_not_in_account_error_managed_users": "Your identity provider returned __email__, which is not already on your current __appName__ account. You will need to log out and create a new __appName__ account with __email__ via the SSO log in page. Once this is done, you can <0>transfer your existing projects to the new account.", "saml_email_not_recognized_error": "This email address isn’t set up for SSO. Please check it and try again or contact your administrator.", + "saml_email_on_another_account_error": "Your identity provider returned __email__, which is on another __appName__ account. Please log out and log in with the other account to join your __teamName__ enterprise group.", "saml_identity_exists_error": "Sorry, the identity returned by your identity provider is already linked with a different Overleaf account. Please contact your administrator for more information.", "saml_invalid_signature_error": "Sorry, the information received from your identity provider has an invalid signature. Please contact your administrator for more information.", "saml_login_disabled_error": "Sorry, single sign-on login has been disabled for __email__. Please contact your administrator for more information.",