161
Turn on authenticator-app 2FA in three calm steps: scan a coded QR or copy the setup key, type the six digits, then copy or download backup codes before you can finish.
aka2fa·two-factor·mfa
Run this in any project set up for the shadcn CLI. It copies the Two-step Setup source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/two-step-setup.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { TwoStepSetup } from "@/components/two-step-setup";
export default function Page() {
return <TwoStepSetup />;
}A free React block in the Auth collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Two-step Setup source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| account | string | "jo@quillstack.io" |
| issuer | string | "Quillstack" |
| secret | string | "JBSWY3DPEHPK3PXP" |
| backupCodes | string[] | ["k7q2-9xmd", "p4tn-v8wc", "3hzr-m2ke", "w9fb-q6ys", "a5lc-t7np", "m8dj-4rvx", "z2ke-h9gq", "c6yw-n3fb", "r4mx-8tlz", "e7pv-2jdc"] |
| verify | (code: string) => Promise<boolean> | async () => true |
| onCancel | () => void | — |
| onDone | () => void | — |
| className | string | — |