Skip to content

Commit

Permalink
Fix rotated secret
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Blaettlinger <[email protected]>
  • Loading branch information
andreas-blaettlinger committed Jun 11, 2024
1 parent eedd167 commit 7d4962a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/apps/admin-ui/src/clients/credentials/ClientSecret.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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 />
Expand Down

0 comments on commit 7d4962a

Please sign in to comment.