Skip to content

Commit

Permalink
chore: add warning message when authentication credentials are revoked (
Browse files Browse the repository at this point in the history
#903)

Co-authored-by: Oleksandr Raspopov <[email protected]>
  • Loading branch information
Alexander-frenki and Oleksandr Raspopov authored Jan 27, 2025
1 parent 5f462ff commit 93ed11f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/src/components/identities/IdentityAuthCredentials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ export function IdentityAuthCredentials({
{credentialToRevoke && (
<CredentialRevokeModal
credential={credentialToRevoke}
extra={
<Typography.Text type="danger">
All BJJSignature2021 proofs signed with this key will be invalid
</Typography.Text>
}
onClose={() => setCredentialToRevoke(undefined)}
onRevoke={() => void fetchAuthCredentials()}
/>
Expand Down
3 changes: 3 additions & 0 deletions ui/src/components/shared/CredentialRevokeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ import { CLOSE, REVOKE } from "src/utils/constants";

export function CredentialRevokeModal({
credential,
extra,
onClose,
onRevoke,
}: {
credential: Credential;
extra?: React.ReactNode;
onClose: () => void;
onRevoke: () => void;
}) {
Expand Down Expand Up @@ -66,6 +68,7 @@ export function CredentialRevokeModal({
title="Are you sure you want to revoke this credential?"
>
<Space direction="vertical">
{extra}
<Typography.Text type="secondary">
Revoking of a credential must be accompanied by publishing of issuer state in order for
the action to be effective. This action cannot be undone.
Expand Down

0 comments on commit 93ed11f

Please sign in to comment.