Explorar o código

Merge pull request #23351 from overleaf/jel-v1-down-sso-login

[web] Catch v1 errors on SSO log in to not block group SSO

GitOrigin-RevId: b99498dfd4a0de2099b8da1ac73dda28280cd430
Jessica Lawshe hai 1 ano
pai
achega
50e0d2b4ff

+ 7 - 0
services/web/app/src/Features/Errors/Errors.js

@@ -71,6 +71,12 @@ class NotInV2Error extends BackwardCompatibleError {}
 
 
 class SLInV2Error extends BackwardCompatibleError {}
 class SLInV2Error extends BackwardCompatibleError {}
 
 
+class SAMLCommonsUnavailable extends OError {
+  get i18nKey() {
+    return 'saml_commons_unavailable'
+  }
+}
+
 class SAMLIdentityExistsError extends OError {
 class SAMLIdentityExistsError extends OError {
   get i18nKey() {
   get i18nKey() {
     return 'institution_account_tried_to_add_already_registered'
     return 'institution_account_tried_to_add_already_registered'
@@ -316,6 +322,7 @@ module.exports = {
   OutputFileFetchFailedError,
   OutputFileFetchFailedError,
   SAMLAssertionAudienceMismatch,
   SAMLAssertionAudienceMismatch,
   SAMLAuthenticationRequiredError,
   SAMLAuthenticationRequiredError,
+  SAMLCommonsUnavailable,
   SAMLIdentityExistsError,
   SAMLIdentityExistsError,
   SAMLAlreadyLinkedError,
   SAMLAlreadyLinkedError,
   SAMLEmailNotAffiliatedError,
   SAMLEmailNotAffiliatedError,

+ 1 - 0
services/web/locales/en.json

@@ -1843,6 +1843,7 @@
   "saml": "SAML",
   "saml": "SAML",
   "saml_auth_error": "Sorry, your identity provider responded with an error.  Please contact your administrator for more information.",
   "saml_auth_error": "Sorry, your identity provider responded with an error.  Please contact your administrator for more information.",
   "saml_authentication_required_error": "Other login methods have been disabled by your group administrator. Please use your group SSO login.",
   "saml_authentication_required_error": "Other login methods have been disabled by your group administrator. Please use your group SSO login.",
+  "saml_commons_unavailable": "Institution SSO is currently unavailable. For more details, please see <0>__linkText__</0>.",
   "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_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_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_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.",