Recovery Check

Recovery Check is a copy-paste React component that stops lost phone meant lost account 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/recovery-check
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

StopsLost phone meant lost account

Was this component page useful?

How do I install Recovery Check?

pnpm dlx shadcn@latest add @bollard/recovery-check

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

How do I use Recovery Check in React?

recovery-check-usage.tsx
import { RecoveryCheck, type IssueId, type RecoveryState } from "@/components/ui/recovery-check"

return <RecoveryCheck state={state} onFix={fix} />

What input mistakes does Recovery Check catch?

  • Recovery email or phone not confirmed within staleAfterDays (default 180)
  • No backup second factor
  • Password-only account
  • The same phone used for SMS codes and recovery
  • Backup codes running low or all used

What props does Recovery Check accept?

RecoveryCheck props
PropTypeDefault
state* (required)

Recovery methods on the account and when each was last confirmed.

RecoveryState—
onFix* (required)

Runs the one-tap fix for an issue. Resolve to mark it fixed; reject to show `failedText`.

(issue: IssueId) => void | Promise<void>—
onChangeContact

Optional "Change" next to a stale email or phone, for users who already know it's gone.

(kind: "email" | "phone") => void—
staleAfterDays

Days without confirmation before an email or phone counts as stale.

number180
issueText

Override the title, detail or fix label of any issue. `{email}`, `{phone}`, `{age}` and `{count}` are filled in.

Partial<Record<IssueId, Partial<(typeof COPY)[IssueId]>>>—
title

Templates: `{count}` is the number of open issues.

string"Could you get back in?"
summaryText

Summary line. `{count}` is the number of open issues.

string"{count} things could lock you out of your account."
allClearText

Shown when nothing is at risk.

string"You can get back in even if you lose your phone."
fixedLabel

Shown in place of the fix button once fixed.

string"Fixed"
changeLabel

Label of the optional Change button for a stale contact.

string"Change"
failedText

Shown when onFix rejects.

string"That didn't work. Try again."
locale

Locale for relative ages ("8 months ago").

string—

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

How is Recovery Check accessible?

  • Section labelled by its title; open-issue summary in a polite live region
  • A failed fix shows role=alert text
  • After a fix, focus moves to the issue's "Fixed" marker
  • Severity is shown with an icon and text, not colour alone; 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?

This is a UX guard rail. Enforce on the server: checkRecovery is pure and can run on the server; the fixes themselves (adding factors, confirming contacts) must be verified server-side.

  • Only as accurate as the RecoveryState you pass in
  • Does not verify that an email or phone still works; it reads the last-confirmed dates
  • Fixes run your onFix callback; nothing changes by itself

What expensive mistakes does Recovery Check stop?

Lost phone meant lost account

Also known as

account recovery · security checkup · recovery email · recovery phone · 2fa · mobile number · security settings · +91

Field type

What dependencies does Recovery Check require?

Recovery Check facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameRecovery Check
Registry identifier@bollard/recovery-check
Install commandnpx shadcn@latest add @bollard/recovery-check
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 Recovery Check

What form validation mistake does Recovery Check catch?

Recovery Check prevents lost phone meant lost account. Shows what would lock a user out if they lost their phone: stale recovery contacts, no backup method, or one phone holding both keys. Catches: Recovery email or phone not confirmed within staleAfterDays (default 180), No backup second factor, Password-only account, The same phone used for SMS codes and recovery, Backup codes running low or all used. Limitation: validate recovery-check schemas on backend.

How do I install recovery-check with shadcn?

Run `npx shadcn@latest add @bollard/recovery-check`. Sources added: registry/default/recovery-check/recovery-check.tsx. Package requirements: lucide-react.

What props customize Recovery Check?

Recovery Check accepts `state`, `onFix`, `onChangeContact`, `staleAfterDays`, `issueText`. Configures account recovery, security checkup, recovery email behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of recovery-check?

Only as accurate as the RecoveryState you pass in. Does not verify that an email or phone still works; it reads the last-confirmed dates. Fixes run your onFix callback; nothing changes by itself Server requirement: checkRecovery is pure and can run on the server; the fixes themselves (adding factors, confirming contacts) must be verified server-side.

How does Recovery Check meet accessibility guidelines?

Section labelled by its title; open-issue summary in a polite live region. A failed fix shows role=alert text. After a fix, focus moves to the issue's "Fixed" marker. Severity is shown with an icon and text, not colour alone; icons are aria-hidden. Minimizes errors: lost phone locked out, no backup 2fa method.

Which components pair with Recovery Check?