Passkey Name Prompt

Passkey Name Prompt is a copy-paste React component that stops identical passkeys nobody can tell apart before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/passkey-name-prompt
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsIdentical passkeys nobody can tell apart

Was this component page useful?

How do I install Passkey Name Prompt?

pnpm dlx shadcn@latest add @bollard/passkey-name-prompt

The files land in your project. They're yours to edit.

How do I use Passkey Name Prompt in React?

passkey-name-prompt-usage.tsx
import { PasskeyNamePrompt } from "@/components/ui/passkey-name-prompt"

<PasskeyNamePrompt
  aaguid="adce0002-35bc-c60a-648b-0b25f1f05503"
  userAgent={MAC_CHROME}
  backupEligible={false}
  existingNames={["iCloud Keychain", "Mac · Chrome", "YubiKey 5C"]}
  defaultValue="Mac · Chrome"
  onSave={() => new Promise((resolve) => setTimeout(resolve, 700))}
  onSkip={() => {}}
/>

What input mistakes does Passkey Name Prompt catch?

  • Identical generic names ("Passkey")
  • Empty or duplicate names, with a one-tap fix
  • Provider from the AAGUID, or device from the user agent
  • Whether the passkey syncs (manager) or stays on this device

What props does Passkey Name Prompt accept?

PasskeyNamePrompt props
PropTypeDefault
aaguid

The new credential's AAGUID, from the registration response. Names syncing managers like iCloud Keychain or 1Password.

string—
userAgent

User agent to describe the device. Read from the browser after mount when omitted.

string—
attachment

`authenticatorAttachment` from the response: "cross-platform" without a known AAGUID reads as a security key.

"platform" | "cross-platform"—
transports

`response.getTransports()`. "hybrid" (made on a phone over a QR code) stops the name and notes describing this computer.

string[]—
backupEligible

The backup-eligible (BE) flag. true: it syncs; false: it lives on this device only. Omit when unknown.

boolean—
existingNames

Names of the user's other passkeys, to keep the new name distinct.

string[][]
providers

Extra AAGUID → provider entries, merged over the built-in table.

Record<string, PasskeyProvider>—
value

Controlled name. Defaults to the suggestion until the user edits it.

string—
defaultValue

Initial name when uncontrolled. Defaults to the suggestion.

string—
onValueChange

Called with the name on every change.

(value: string) => void—
onSave

Saves the name. May return a Promise; the button shows a pending state and a rejection shows an error.

(name: string) => void | Promise<void>—
onSkip

Shows a Skip button. Called with the suggestion so the passkey is never left as just "Passkey".

(suggestion: string) => void—
maxLength

Longest name allowed.

number64
delay

Pause in ms before warnings appear while typing.

number400
messages

Override any visible or announced text.

Partial<PasskeyNameMessages>—

* required. Also accepts the native props of <input> (className, aria-*, data-*…), passed through to it.

How is Passkey Name Prompt accessible?

  • Visible label; input has aria-invalid when blocked and is described by a polite status
  • Blocking errors use role=alert
  • Icons are aria-hidden

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • Display only, never a trust decision; AAGUIDs can be zeroed or spoofed
  • Built-in AAGUID table is small; pass providers for others
  • User-agent device names are best-effort

What expensive mistakes does Passkey Name Prompt stop?

Identical passkeys nobody can tell apart

Also known as

passkey · webauthn · security keys · aaguid · icloud keychain · 1password · security settings · biometrics

Field type

What dependencies does Passkey Name Prompt require?

Passkey Name Prompt facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component namePasskey Name Prompt
Registry identifier@bollard/passkey-name-prompt
Install commandnpx shadcn@latest add @bollard/passkey-name-prompt
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Passkey Name Prompt

What form validation mistake does Passkey Name Prompt catch?

Passkey Name Prompt prevents identical passkeys nobody can tell apart. Prefills a distinct name right after a passkey is created, so the security page isn't a list of identical "Passkey" rows nobody can tell apart. Catches: Identical generic names ("Passkey"), Empty or duplicate names, with a one-tap fix, Provider from the AAGUID, or device from the user agent, Whether the passkey syncs (manager) or stays on this device. Limitation: validate passkey-name-prompt schemas on backend.

How do I install passkey-name-prompt with shadcn?

Run `npx shadcn@latest add @bollard/passkey-name-prompt`. Sources added: registry/default/passkey-name-prompt/passkey-name-prompt.tsx, registry/default/passkey-name-prompt/passkey-name.ts. Package requirements: lucide-react.

What props customize Passkey Name Prompt?

Passkey Name Prompt accepts `aaguid`, `userAgent`, `attachment`, `transports`, `backupEligible`. Configures passkey, webauthn, security keys behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of passkey-name-prompt?

Display only, never a trust decision; AAGUIDs can be zeroed or spoofed. Built-in AAGUID table is small; pass providers for others. User-agent device names are best-effort Server requirement: backend verification for passkey-name-prompt.

How does Passkey Name Prompt meet accessibility guidelines?

Visible label; input has aria-invalid when blocked and is described by a polite status. Blocking errors use role=alert. Icons are aria-hidden. Minimizes errors: all passkeys named passkey, cant tell which passkey to delete.

Which components pair with Passkey Name Prompt?