Client Secret and Secret Rotated are always the same#50137
Open
mabartos wants to merge 1 commit into
Open
Conversation
…always the same Closes keycloak#49342 Closes keycloak#50134 Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Admin Console client secret rotation rendering in the Clients → Credentials tab so that the “Secret Rotated” value is no longer bound to the same form field as “Client Secret”, and ensures the UI refreshes after rotated-secret invalidation.
Changes:
- Passes
refresh()into the client secret credentials section so child components can refetch client data after mutations. - Removes duplicated local state for rotated secret and derives it directly from
client.attributes. - Refreshes client data after invalidating the rotated secret and renders the rotated secret as a read-only value (preventing it from being tied to the
"secret"form control).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| js/apps/admin-ui/src/clients/credentials/Credentials.tsx | Wires refresh into the client secret UI so downstream actions can refetch client data. |
| js/apps/admin-ui/src/clients/credentials/ClientSecret.tsx | Fixes rotated secret display by avoiding binding it to the "secret" form control; refreshes after invalidation. |
Comment on lines
28
to
32
| type SecretInputProps = ClientSecretProps & { | ||
| id: string; | ||
| buttonLabel: string; | ||
| isReadOnly?: boolean; | ||
| }; |
Comment on lines
153
to
160
| <SecretInput | ||
| id="kc-client-secret" | ||
| client={client} | ||
| secret={secret} | ||
| toggle={toggle} | ||
| refresh={refresh} | ||
| buttonLabel="regenerate" | ||
| /> |
Comment on lines
168
to
176
| <SecretInput | ||
| id="secretRotated" | ||
| client={client} | ||
| secret={secretRotated} | ||
| toggle={toggleInvalidateConfirm} | ||
| refresh={refresh} | ||
| buttonLabel="invalidateSecret" | ||
| isReadOnly | ||
| /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OLD
Screencast.From.2026-06-18.18-13-38.mp4
NEW
Screencast.From.2026-06-18.18-11-35.mp4
@edewit @rmartinc Could you please check it? Thanks!