From 29871caf2b5f44243a7e13db39ad57c23faac8d5 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Tue, 5 Dec 2023 15:35:30 +0000 Subject: [PATCH] Merge pull request #16035 from overleaf/bg-group-sso-login-errors add an error for unrecognised email on saml login GitOrigin-RevId: 7102cde8b2b9ccb510f913394c555efc39dd9016 --- services/web/app/src/Features/Errors/Errors.js | 7 +++++++ services/web/locales/en.json | 1 + 2 files changed, 8 insertions(+) diff --git a/services/web/app/src/Features/Errors/Errors.js b/services/web/app/src/Features/Errors/Errors.js index 1ca6374a4b..e5358670f8 100644 --- a/services/web/app/src/Features/Errors/Errors.js +++ b/services/web/app/src/Features/Errors/Errors.js @@ -134,6 +134,12 @@ class SAMLLoginFailureError extends SAMLAuthenticationError { } } +class SAMLEmailNotRecognizedError extends SAMLAuthenticationError { + get i18nKey() { + return 'saml_email_not_recognized' + } +} + class SAMLSessionDataMissing extends BackwardCompatibleError { constructor(arg) { super(arg) @@ -270,6 +276,7 @@ module.exports = { SAMLMissingSignatureError, SAMLInvalidResponseError, SAMLLoginFailureError, + SAMLEmailNotRecognizedError, SLInV2Error, ThirdPartyIdentityExistsError, ThirdPartyUserNotFoundError, diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 860f21a4b3..46cf85d4ae 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -1533,6 +1533,7 @@ "saml": "SAML", "saml_auth_error": "Sorry, your identity provider responded with an error. Please contact your administrator for more information.", "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_recognized_error": "This email address isn’t set up for SSO. Please check it and try again or contact your administrator.", "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.",