fixed type (#2872)

This commit is contained in:
Erik Jan de Wit 2022-06-27 10:41:57 +02:00 committed by GitHub
parent 4e0bb695f8
commit b74265c722
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,51 +57,50 @@ export const LogoutPanel = ({
id="kc-frontchannelLogout-switch" id="kc-frontchannelLogout-switch"
label={t("common:on")} label={t("common:on")}
labelOff={t("common:off")} labelOff={t("common:off")}
isChecked={value.toString() === "true"} isChecked={value}
onChange={(value) => onChange(value.toString())} onChange={onChange}
/> />
)} )}
/> />
</FormGroup> </FormGroup>
{protocol === "openid-connect" && {protocol === "openid-connect" && frontchannelLogout && (
frontchannelLogout?.toString() === "true" && ( <FormGroup
<FormGroup label={t("frontchannelLogoutUrl")}
label={t("frontchannelLogoutUrl")} fieldId="frontchannelLogoutUrl"
fieldId="frontchannelLogoutUrl" labelIcon={
labelIcon={ <HelpItem
<HelpItem helpText="clients-help:frontchannelLogoutUrl"
helpText="clients-help:frontchannelLogoutUrl" fieldLabelId="clients:frontchannelLogoutUrl"
fieldLabelId="clients:frontchannelLogoutUrl" />
/> }
} helperTextInvalid={
helperTextInvalid={ errors.attributes?.frontchannel?.logout?.url?.message
errors.attributes?.frontchannel?.logout?.url?.message }
} validated={
errors.attributes?.frontchannel?.logout?.url?.message
? ValidatedOptions.error
: ValidatedOptions.default
}
>
<KeycloakTextInput
type="text"
id="frontchannelLogoutUrl"
name="attributes.frontchannel.logout.url"
ref={register({
validate: (uri) =>
((uri.startsWith("https://") || uri.startsWith("http://")) &&
!uri.includes("*")) ||
uri === "" ||
t("frontchannelUrlInvalid").toString(),
})}
validated={ validated={
errors.attributes?.frontchannel?.logout?.url?.message errors.attributes?.frontchannel?.logout?.url?.message
? ValidatedOptions.error ? ValidatedOptions.error
: ValidatedOptions.default : ValidatedOptions.default
} }
> />
<KeycloakTextInput </FormGroup>
type="text" )}
id="frontchannelLogoutUrl"
name="attributes.frontchannel.logout.url"
ref={register({
validate: (uri) =>
((uri.startsWith("https://") || uri.startsWith("http://")) &&
!uri.includes("*")) ||
uri === "" ||
t("frontchannelUrlInvalid").toString(),
})}
validated={
errors.attributes?.frontchannel?.logout?.url?.message
? ValidatedOptions.error
: ValidatedOptions.default
}
/>
</FormGroup>
)}
<FormGroup <FormGroup
label={t("backchannelLogoutUrl")} label={t("backchannelLogoutUrl")}
fieldId="backchannelLogoutUrl" fieldId="backchannelLogoutUrl"