Merge pull request #30964 from overleaf/jel-commons-migrate-email-not-primary

[web] Check all emails instead of just primary on group SSO callbacks

GitOrigin-RevId: 52ac46e04134772025ca1812d25aad2e68fa44ea
This commit is contained in:
Jessica Lawshe
2026-01-28 08:46:11 -06:00
committed by Copybot
parent c734574175
commit 9d625fc834
3 changed files with 9 additions and 1 deletions
@@ -136,6 +136,12 @@ class SAMLGroupSSOLoginIdentityMismatchError extends SAMLAuthenticationError {
}
}
class SAMLGroupSSOLoginRequestedEmailNotConfirmed extends SAMLAuthenticationError {
get i18nKey() {
return 'saml_login_requested_email_not_confirmed_error'
}
}
class SAMLGroupSSOLoginIdentityNotFoundError extends SAMLAuthenticationError {
get i18nKey() {
return 'saml_login_identity_not_found_error'
@@ -391,6 +397,7 @@ module.exports = {
SAMLGroupSSOLoginIdentityMismatchError,
SAMLGroupSSOLoginIdentityNotFoundError,
SAMLGroupSSODisabledError,
SAMLGroupSSOLoginRequestedEmailNotConfirmed,
SAMLInvalidUserAttributeError,
SAMLInvalidUserIdentifierError,
SAMLInvalidSignatureError,
+1
View File
@@ -2014,6 +2014,7 @@
"saml_login_failure": "Sorry, there was a problem logging you in. Please contact your administrator for more information.",
"saml_login_identity_mismatch_error": "Sorry, you are trying to log in to Overleaf as __email__ but the identity returned by your identity provider is not the correct one for this Overleaf account.",
"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_login_requested_email_not_confirmed_error": "Sorry, the email address you requested to use for login has not been confirmed and we cannot complete your SSO log in request. If you have another method to log in please log in and then confirm your email. Please <0>contact us</0> if you need assistance.",
"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.",
@@ -42,7 +42,7 @@ export async function createGroupSSO(
const nonSSOMember = nonSSOMemberHelper.user
const groupAdminUser = new User()
const memberUser = new User()
const memberUser = new User({ confirmedAt: new Date() })
await groupAdminUser.ensureUserExists()
await memberUser.ensureUserExists()