Skip to content
Eskais UI

Accounts

Secret Fingerprint

SecretFingerprint: the masked display of a stored secret, •••• 1a2b in a monospace font, from the few characters your server derives. The mask is hidden from screen readers, which hear "Ending in 1a2b" (labels). It takes only fingerprint, a string or null, so the secret itself never reaches it.

Example

OpenAI API key
Ending in x7Qa
Stripe webhook secret
Ending in 9f2c
Legacy token
No fingerprint

Installation

npx shadcn@latest add @eskais/secret-fingerprint

Usage

Import
import { SecretFingerprint, secretFingerprintLabels } from "@/components/ui/secret-fingerprint"

Show which secret is stored without showing it: pass the last few characters your server derived. It never takes the value, so it can't leak one.

API reference

SecretFingerprint

PropTypeDefault
fingerprintrequiredThe few characters your server derives, like the last four; `null` shows the mask alone. Never the secret.string | null–
labelsPartial<SecretFingerprintLabels>–
classNamestring–

Other exports

secretFingerprintLabelstype SecretFingerprintLabelstype SecretFingerprintProps

Accessibility

  • The dots are hidden from screen readers, which hear Ending in 1a2b (or No fingerprint) instead.

Agent actions

Plain text: agents read the fingerprint with the page, which is safe since it isn't secret.

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.