Show error when enabling SAML required with empty identity provider metadata#76825
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 1295dd1f..b76858ea 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -7870,6 +7870,7 @@ Hier ist ein *Testbeleg*, um dir zu zeigen, wie es funktioniert:`,
requireError: 'SAML-Anforderungseinstellung konnte nicht aktualisiert werden',
disableSamlRequired: 'SAML-Anforderung deaktivieren',
oktaWarningPrompt: 'Bist du sicher? Dadurch wird auch Okta SCIM deaktiviert.',
+ requireWithEmptyMetadataError: 'Bitte fügen Sie unten die Identity-Provider-Metadaten hinzu, um zu aktivieren',
},
samlConfigurationDetails: {
title: 'SAML-Konfigurationsdetails',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index 37d4375c..420738c4 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -7878,6 +7878,7 @@ Voici un *reçu test* pour vous montrer comment cela fonctionne :`,
requireError: 'Impossible de mettre à jour le paramètre d’exigence SAML',
disableSamlRequired: 'Désactiver l’exigence SAML',
oktaWarningPrompt: 'Êtes-vous sûr ? Cela désactivera également Okta SCIM.',
+ requireWithEmptyMetadataError: 'Veuillez ajouter les métadonnées du fournisseur d’identité ci-dessous pour activer',
},
samlConfigurationDetails: {
title: 'Détails de configuration SAML',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index db9d5092..ebf147aa 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -7851,6 +7851,7 @@ Ecco una *ricevuta di prova* per mostrarti come funziona:`,
requireError: "Impossibile aggiornare l'impostazione dei requisiti SAML",
disableSamlRequired: 'Disabilita SAML obbligatorio',
oktaWarningPrompt: 'Sei sicuro? Questo disabiliterà anche Okta SCIM.',
+ requireWithEmptyMetadataError: 'Aggiungi di seguito i metadati del provider di identità per abilitare',
},
samlConfigurationDetails: {
title: 'Dettagli di configurazione SAML',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 90ff5cef..e86de5ee 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -7798,6 +7798,7 @@ Expensify の使い方をお見せするための*テストレシート*がこ
requireError: 'SAML 必須設定を更新できませんでした',
disableSamlRequired: 'SAML 必須を無効にする',
oktaWarningPrompt: 'よろしいですか?これにより Okta SCIM も無効になります。',
+ requireWithEmptyMetadataError: 'Id プロバイダーのメタデータを以下に追加して有効化してください',
},
samlConfigurationDetails: {
title: 'SAML 設定の詳細',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 8c8f029d..0be97b71 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -7836,11 +7836,12 @@ Hier is een *testbon* om je te laten zien hoe het werkt:`,
requireError: 'Kon de SAML-vereiste-instelling niet bijwerken',
disableSamlRequired: '‘SAML vereist’ uitschakelen',
oktaWarningPrompt: 'Weet je het zeker? Dit schakelt ook Okta SCIM uit.',
+ requireWithEmptyMetadataError: 'Voeg hieronder de Identity Provider-metadata toe om in te schakelen',
},
samlConfigurationDetails: {
title: 'SAML-configuratiegegevens',
subtitle: 'Gebruik deze gegevens om SAML in te stellen.',
- identityProviderMetadata: 'Identity Provider-meta-gegevens',
+ identityProviderMetadata: 'Metagegevens van identiteitsprovider',
entityID: 'Entiteit-ID',
nameIDFormat: 'Naam-ID-indeling',
loginUrl: 'Login-URL',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 3a85b1a1..a68d43f8 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -7826,6 +7826,7 @@ Oto *paragon testowy*, który pokazuje, jak to działa:`,
requireError: 'Nie można było zaktualizować ustawienia wymogu SAML',
disableSamlRequired: 'Wyłącz wymóg SAML',
oktaWarningPrompt: 'Czy na pewno? Spowoduje to również wyłączenie Okta SCIM.',
+ requireWithEmptyMetadataError: 'Dodaj poniżej metadane dostawcy tożsamości, aby włączyć',
},
samlConfigurationDetails: {
title: 'Szczegóły konfiguracji SAML',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index c1def8a7..a24df49d 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -7829,6 +7829,7 @@ Aqui está um *recibo de teste* para mostrar como funciona:`,
requireError: 'Não foi possível atualizar a configuração de requisito SAML',
disableSamlRequired: 'Desativar SAML obrigatório',
oktaWarningPrompt: 'Você tem certeza? Isso também desativará o Okta SCIM.',
+ requireWithEmptyMetadataError: 'Adicione os metadados do Provedor de Identidade abaixo para ativar',
},
samlConfigurationDetails: {
title: 'Detalhes da configuração SAML',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index c3c5eee9..dc3f2c91 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -7676,11 +7676,12 @@ ${reportName}
requireError: '无法更新 SAML 要求设置',
disableSamlRequired: '禁用 SAML 要求',
oktaWarningPrompt: '您确定吗?这也会禁用 Okta SCIM。',
+ requireWithEmptyMetadataError: '请在下方添加身份提供商元数据以启用',
},
samlConfigurationDetails: {
title: 'SAML 配置详情',
subtitle: '使用以下详细信息来完成 SAML 设置。',
- identityProviderMetadata: '身份提供商元数据',
+ identityProviderMetadata: '身份提供者元数据',
entityID: '实体 ID',
nameIDFormat: '名称 ID 格式',
loginUrl: '登录 URL',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
cc: @ZhenjaHorbach |
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2025-12-11.10.59.51.movAndroid: mWeb Chrome2025-12-11.10.59.51.moviOS: HybridApp2025-12-11.10.59.51.moviOS: mWeb Safari2025-12-11.10.59.51.mov |
|
But I know what the problem is |
|
When we reopen the screen we still have the 2025-12-11.10.52.21.mov |
hmm, if I reset the "samlRequiredError" field when opening the page, it would also reset the errors sent from backend. and since we're doing an optimistic update for the toggle I don't know if that's the desired behavior (like when a user turns on the toggle, then leaves the page, reopens it and sees it being off and if we reset the error, they wouldn't know why). should I separate the error property to only reset the new error from this PR, or is it okay to clear them all, or can we keep all? |
I think it's better to reset all errors And in this case 2025-12-11.11.06.16.mov |
|
I made it so the saml required error is reset after submitting an IdP metadata. and also the saml required and enabled errors are now reset when first entering the page. |
|
LGTM! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/NikkiWines in version: 9.2.78-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.78-8 🚀
|


Explanation of Change
Shows an error when trying to enable SAML required on a domain, when no identity provider metadata is provided.
Fixed Issues
$ #76385
PROPOSAL: N/A
Tests
// or erase it in onyx Onyx.merge('saml_metadata_<domainAccountID>', {metaIdentity: null})
Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Nagranie.z.ekranu.2025-12-9.o.11.21.19.mov
Android: mWeb Chrome
Nagranie.z.ekranu.2025-12-9.o.11.23.13.mov
iOS: Native
Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2025-12-09.at.11.15.40.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2025-12-09.at.11.20.01.mp4
MacOS: Chrome / Safari
Nagranie.z.ekranu.2025-12-5.o.15.47.57.mov