From ae54594882be4fbae2667555d236eddeef3e3c5c Mon Sep 17 00:00:00 2001 From: Simon Gardner Date: Thu, 28 Aug 2025 11:14:40 +0100 Subject: [PATCH] Improve display of generic SAML errors GitOrigin-RevId: 60096874480c268be52faddd96ebdf870bdf0a64 --- services/web/app/src/Features/Errors/Errors.js | 7 +++++++ services/web/frontend/extracted-translations.json | 1 + services/web/locales/en.json | 1 + 3 files changed, 9 insertions(+) diff --git a/services/web/app/src/Features/Errors/Errors.js b/services/web/app/src/Features/Errors/Errors.js index 1ba294cda4..e0da50ce77 100644 --- a/services/web/app/src/Features/Errors/Errors.js +++ b/services/web/app/src/Features/Errors/Errors.js @@ -223,6 +223,12 @@ class SAMLSessionDataMissing extends BackwardCompatibleError { class SAMLProviderRequesterError extends SAMLAuthenticationError {} +class SAMLProviderRequesterInvalidNameIDPolicyError extends SAMLProviderRequesterError { + get i18nKey() { + return 'sso_provider_error_invalid_name' + } +} + class ThirdPartyIdentityExistsError extends BackwardCompatibleError { constructor(arg) { super(arg) @@ -358,6 +364,7 @@ module.exports = { SAMLMissingUserIdentifierError, SAMLMissingSignatureError, SAMLProviderRequesterError, + SAMLProviderRequesterInvalidNameIDPolicyError, SAMLInvalidResponseError, SAMLLoginFailureError, SAMLEmailNotRecognizedError, diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index e62d86eac0..11d23fe9ee 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -1670,6 +1670,7 @@ "sso_link_invite_has_been_sent_to_email": "", "sso_logs": "", "sso_not_active": "", + "sso_provider_error_invalid_name": "", "sso_reauth_request": "", "sso_test_interstitial_info_1": "", "sso_test_interstitial_info_2": "", diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 57cad2fe18..c93e9cb013 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -2160,6 +2160,7 @@ "sso_logs": "SSO Logs", "sso_not_active": "SSO not active", "sso_not_linked": "You have not linked your account to __provider__. Please log in to your account another way and link your __provider__ account via your account settings.", + "sso_provider_error_invalid_name": "The identity provider returned an InvalidNameIDPolicy error. This happens when the identity provider is unable to provide a user identity in the format requested by this application.", "sso_reauth_request": "SSO reauthentication request has been sent to <0>__email__", "sso_test_interstitial_info_1": "<0>Before starting this test, please ensure you’ve <1>configured Overleaf as a Service Provider in your IdP, and authorized access to the Overleaf service.", "sso_test_interstitial_info_2": "Clicking <0>Test configuration will redirect you to your IdP’s login screen. <1>Read our documentation for full details of what happens during the test. And check our <2>SSO troubleshooting advice if you get stuck.",