Fix rotated secret (#30331)

Signed-off-by: Andreas Blaettlinger <bln1imb@bosch.com>
This commit is contained in:
Andreas Blättlinger 2024-06-11 13:29:05 +02:00 committed by GitHub
parent 780ec71672
commit d83537005f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,7 +8,7 @@ import {
Split,
SplitItem,
} from "@patternfly/react-core";
import { useState } from "react";
import { useEffect, useState } from "react";
import { useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next";
import { PasswordInput } from "@keycloak/keycloak-ui-shared";
@ -121,6 +121,12 @@ export const ClientSecret = ({ client, secret, toggle }: ClientSecretProps) => {
},
});
useEffect(() => {
if (secretRotated !== client.attributes?.["client.secret.rotated"]) {
setSecretRotated(client.attributes?.["client.secret.rotated"]);
}
}, [client, secretRotated]);
return (
<>
<InvalidateConfirm />