diff --git a/services/web/app/src/Features/Errors/Errors.js b/services/web/app/src/Features/Errors/Errors.js index 40076cea6e..7e32da2824 100644 --- a/services/web/app/src/Features/Errors/Errors.js +++ b/services/web/app/src/Features/Errors/Errors.js @@ -138,6 +138,24 @@ class SAMLMissingSignatureError extends SAMLAuthenticationError { } } +class SAMLInvalidUserIdentifierError extends SAMLAuthenticationError { + get i18nKey() { + return 'saml_authentication_required_error' + } +} + +class SAMLInvalidUserAttributeError extends SAMLAuthenticationError { + get i18nKey() { + return 'saml_authentication_required_error' + } +} + +class SAMLMissingUserIdentifierError extends SAMLAuthenticationError { + get i18nKey() { + return 'saml_missing_user_attribute' + } +} + class SAMLInvalidResponseError extends SAMLAuthenticationError {} class SAMLResponseAlreadyProcessedError extends SAMLInvalidResponseError { @@ -305,7 +323,10 @@ module.exports = { SAMLGroupSSOLoginIdentityMismatchError, SAMLGroupSSOLoginIdentityNotFoundError, SAMLGroupSSODisabledError, + SAMLInvalidUserAttributeError, + SAMLInvalidUserIdentifierError, SAMLInvalidSignatureError, + SAMLMissingUserIdentifierError, SAMLMissingSignatureError, SAMLInvalidResponseError, SAMLLoginFailureError, diff --git a/services/web/locales/en.json b/services/web/locales/en.json index f60f412029..4bd9e1d817 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -1821,6 +1821,7 @@ "saml_login_identity_not_found_error": "Sorry, we were not able to find an Overleaf account set up for single sign-on with this identity provider.", "saml_metadata": "Overleaf SAML Metadata", "saml_missing_signature_error": "Sorry, the information received from your identity provider is not signed (both response and assertion signatures are required). Please contact your administrator for more information.", + "saml_missing_user_attribute": "There was a problem with your Single Sign-on authentication. Your organization did not provide the required information to complete authentication. Please contact your administrator for more information.", "saml_response": "SAML Response", "save": "Save", "save_20_percent": "save 20%",