diff --git a/packages/console/src/onboarding/pages/SignInExperience/index.tsx b/packages/console/src/onboarding/pages/SignInExperience/index.tsx index 0b44080f4..706af86d0 100644 --- a/packages/console/src/onboarding/pages/SignInExperience/index.tsx +++ b/packages/console/src/onboarding/pages/SignInExperience/index.tsx @@ -116,9 +116,19 @@ function SignInExperience() { } } + /** + * Note: extract `mfa` since it will not be updated on the SIE config page. + * This is a temporary solution, we will split `SignInExperience` type into multiple types + * when the SIE config page is split into multiple pages. + */ + const { mfa, ...payload } = parser.onboardSieConfigToSignInExperience( + formData, + signInExperience + ); + const updatedData = await api .patch(buildUrl('api/sign-in-exp', { removeUnusedDemoSocialConnector: '1' }), { - json: parser.onboardSieConfigToSignInExperience(formData, signInExperience), + json: payload, }) .json(); diff --git a/packages/console/src/pages/SignInExperience/index.tsx b/packages/console/src/pages/SignInExperience/index.tsx index 60b4d4644..aef0f8c95 100644 --- a/packages/console/src/pages/SignInExperience/index.tsx +++ b/packages/console/src/pages/SignInExperience/index.tsx @@ -133,10 +133,14 @@ function SignInExperience() { setIsSaving(true); try { + /** + * Note: extract `mfa` since it will not be updated on the SIE config page. + * This is a temporary solution, we will split `SignInExperience` type into multiple types + * when the SIE config page is split into multiple pages. + */ + const { mfa, ...payload } = signInExperienceParser.toRemoteModel(getValues()); const updatedData = await api - .patch('api/sign-in-exp', { - json: signInExperienceParser.toRemoteModel(getValues()), - }) + .patch('api/sign-in-exp', { json: payload }) .json(); reset(signInExperienceParser.toLocalForm(updatedData)); void mutate(updatedData);