remove fields when standard flow disabled (#20271)

fixes: #20194
This commit is contained in:
Erik Jan de Wit 2023-05-25 11:18:00 +02:00 committed by GitHub
parent 5cd0d51fa6
commit c86254972b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,8 @@ export const LoginSettings = ({
const idpInitiatedSsoUrlName: string = watch(
"attributes.saml_idp_initiated_sso_url_name"
);
const standardFlowEnabled = watch("standardFlowEnabled");
return (
<>
<FormGroup
@ -62,6 +64,8 @@ export const LoginSettings = ({
{...rest}
/>
</FormGroup>
{standardFlowEnabled && (
<>
<FormGroup
label={t("validRedirectUri")}
fieldId="kc-redirect"
@ -100,7 +104,9 @@ export const LoginSettings = ({
stringify
{...rest}
/>
</FormGroup>
</FormGroup>{" "}
</>
)}
{protocol === "saml" && (
<>
<FormGroup
@ -163,7 +169,7 @@ export const LoginSettings = ({
</FormGroup>
</>
)}
{protocol !== "saml" && (
{protocol !== "saml" && standardFlowEnabled && (
<FormGroup
label={t("webOrigins")}
fieldId="kc-web-origins"