Staaarter

Confirm It's You

Full-height step-up authentication screen shown before a sensitive action. Displays the signed-in account near the top, a single password field with a real show/hide toggle, a confirm button, and a cancel link.

By Staaarter Team
Auth
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, avatar, avatar-initials dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/confirm-its-you.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/auth/auth46.tsx instead.

Usage

The file also exports auth46Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Auth46, auth46Demo } from "@/components/blocks/auth/auth46";

export default function Page() {
  return <Auth46 {...auth46Demo} />;
}

Props

PropTypeDefaultDescription
accountAccountnoneThe currently signed-in account shown near the top.
messagestringnoneExplains what the confirmation is gating, e.g. which page or action.
passwordLabelstringnoneLabel for the password field.
confirmLabelstringnoneLabel for the confirm button.
cancelLabelstringnoneLabel for the cancel link.
cancelHrefstringnoneHref for the cancel link.
classNamestringnoneExtra classes for the outer section element.

Types

type Account = {
  name: string;
  email: string;
  avatar?: { src: string; alt: string };
};

Behavior notes

  • Client component only for the password show/hide toggle, which flips a real boolean state and swaps the input's type between "password" and "text".
  • account.avatar is optional; when omitted the Avatar falls back to initials derived from account.name.
  • The confirm button performs no real re-authentication call and is left inert; a real integration would submit the password to a step-up auth endpoint.