Two Factor 2 - Authenticator setup with QR code and secret

A numbered setup flow for authenticator apps showing a deterministic QR code, a copyable secret key for manual entry and a code field to confirm pairing. Use it in account security settings when users turn on two-factor authentication.

About Two Factor 2

A numbered setup flow for authenticator apps showing a deterministic QR code, a copyable secret key for manual entry and a code field to confirm pairing. Use it in account security settings when users turn on two-factor authentication.

Two Factor 2 is a free two factor block for React, built on shadcn/ui and Tailwind CSS. It ships as 135 lines of TypeScript you own: every piece of copy is a prop with a sensible default, so you can drop it in and replace the content without touching the layout.

  • two-factor
  • 2fa
  • qr code
  • authenticator
  • setup
  • security

Installation

  1. Add the Chocolate UI registry to your components.json (see the installation guide).
  2. Run the shadcn CLI:
npx shadcn@latest add @chocolate/two-factor-02

Dependencies installed automatically: lucide-react.

Uses: button, input-otp, reveal, use-copy, utils.

Usage

import TwoFactor02 from "@/components/blocks/two-factor-02"

export default function Page() {
  return <TwoFactor02 />
}

FAQ