Security Question Setup

Full-height security question setup with a question select and an answer field, plus a skip option. Perfect for account recovery setup and identity verification fallbacks.

PRO

Auth48: Security Question Setup

A full-height centered card that lets a user set a security question for account recovery: an optional circular icon, heading, and description sit above a bordered card holding a Select of security questions, a free-text answer Input, and a submit Button, with an optional skip prompt link below.

Upgrade to Pro

Pro blocks install through the shadcn CLI with your license key and ship their full source. Docs and live previews stay open to everyone, so you can read every block's details first.

Installation

Swap YOUR_EMAIL and YOUR_KEY for the email and license key on your account. Find your license key on your account page.

Radix flavor

bash
npx shadcn add "https://ui.beste.co/r/auth48?email=YOUR_EMAIL&license_key=YOUR_KEY"

Base UI flavor

bash
npx shadcn add "https://ui.beste.co/r-base/auth48?email=YOUR_EMAIL&license_key=YOUR_KEY"

This installs the block to components/beste/block/auth48.tsx, plus the button, input, select, and field shadcn/ui primitives it uses for the submit action, the answer entry, the question dropdown, and the labeled field layout.

Quick start

The installed file exports auth48Demo alongside the block: the exact props behind the preview above. Spread it to get a working security question form in one line.

tsx
import { Auth48, auth48Demo } from "@/components/beste/block/auth48";

export default function SecurityQuestionPage() {
  return <Auth48 {...auth48Demo} />;
}

Then replace the demo with your own props. Written out, a trimmed setup looks like this:

tsx
import { ShieldQuestion } from "lucide-react";
import { Auth48 } from "@/components/beste/block/auth48";

export default function SecurityQuestionPage() {
  return (
    <Auth48
      icon={<ShieldQuestion className="size-6" />}
      heading="Set a security question"
      description="We'll use this to verify your identity if you ever get locked out."
      questions={[
        { value: "pet", label: "What was the name of your first pet?" },
        { value: "city", label: "In what city were you born?" },
      ]}
      defaultQuestion="pet"
      labels={{
        question: "Security question",
        answer: "Your answer",
        submit: "Save security question",
      }}
      skipPrompt={{ text: "Set this up later?", linkLabel: "Skip for now", href: "/dashboard" }}
    />
  );
}

Props

PropTypeDefaultDescription
iconReact.ReactNodeOptional glyph shown in the circular badge above the heading
headingstringCentered page heading, rendered as an <h1>
descriptionstringMuted supporting line under the heading
questionsSecurityQuestion[][]Options rendered inside the question Select
defaultQuestionstringInitial selected question value, seeds internal state
labels{ question?: string; questionPlaceholder?: string; answer?: string; answerPlaceholder?: string; submit?: string }{}Field labels, placeholders, and submit button text
skipPrompt{ text: string; linkLabel: string; href: string }Optional skip line and link rendered below the card
classNamestringExtra classes for the outer <section>
ts
type SecurityQuestion = {
  value: string;
  label: string;
};

Behavior notes

Wiring the form up

This block ships the form markup only; state, validation, and submit are yours to add. Our guide wires the shadcn Field primitives to React Hook Form, TanStack Form, and Formisch on one field system.

More Auth blocks

View all Auth
PRO

auth47

Recovery Phrase Entry

Full-height account recovery screen with a numbered grid of word inputs and paste-to-fill support, plus a restore button that unlocks once every word is entered. Perfect for seed phrase and recovery-phrase restore flows.

PRO

auth24

Complete Your Profile

Full-height profile setup step with an avatar uploader, a display name field, and a bio textarea, plus a skip option. Perfect for the post-sign-up onboarding step where users personalize their account.

FREE

auth5

Set New Password

Full-height reset-password screen with new and confirm password fields (each with a show/hide toggle) and a live requirements checklist that ticks off rules as the user types. Perfect for the final step of a password reset or invite flow.

PRO

auth46

Confirm It's You

Full-height step-up authentication screen that re-asks for the password before a sensitive action, showing the signed-in account and a cancel option. Perfect for protecting billing, security, and destructive actions.

PRO

auth39

Enable Two-Factor

Full-height security setup step where the user picks a two-factor method from selectable cards (authenticator app, SMS, or security key), with a skip option. Perfect for guiding users through enabling 2FA.

FREE

auth4

Forgot Password Request

Full-height password recovery screen with a centered icon, single email field built on the shadcn Field primitives, a send-reset-link button, and a back-to-sign-in link. Perfect for the first step of any password reset flow.