Sign-in Approve

Sign-in Approve is a copy-paste React component that stops helps prevent approving an attacker's sign-in through push fatigue 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/sign-in-approve
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

StopsHelps prevent approving an attacker's sign-in through push fatigue

Was this component page useful?

How do I install Sign-in Approve?

pnpm dlx shadcn@latest add @bollard/sign-in-approve

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

How do I use Sign-in Approve in React?

sign-in-approve-usage.tsx
import { SignInApprove, type SignInRequest } from "@/components/ui/sign-in-approve"

<SignInApprove
  key={String(request.requestedAt)}
  request={request}
  onApprove={(number) => new Promise((resolve) => setTimeout(() => resolve(number === "47"), 400))}
  onDeny={(reason) => setLog(`Denied (${reason}).`)}
  onSecure={() => setLog("Opening password reset…")}
/>

What input mistakes does Sign-in Approve catch?

  • Approvals without seeing the sign-in screen (number matching)
  • Unusual locations far from normal sign-ins
  • Bursts of requests in the last 15 minutes
  • Someone claiming to be support asking for the number
  • Wrong numbers, stopping after maxAttempts
  • Expired requests

What props does Sign-in Approve accept?

SignInApprove props
PropTypeDefault
request* (required)

The sign-in request: place, device, app, expiry and burst count.

SignInRequest—
onApprove* (required)

Checks the typed number against the sign-in screen. Resolve `true` to approve; `false` counts as a wrong number.

(number: string) => boolean | Promise<boolean>—
onDeny* (required)

Called once the request is refused, with why.

(reason: DenyReason) => void—
onSecure* (required)

Starts the "secure my account" path (change password, sign out everywhere).

() => void—
maxAttempts

Wrong numbers allowed before the request is refused.

number2
length

Digits in the number shown on the sign-in screen.

number2
title

Templates: `{app}`, `{count}`, `{left}` and `{device}` are filled in.

string"Is someone signing in to {app}?"
numberLabel

Label of the number input.

string"Type the number shown on your sign-in screen"
scamWarning

Warning that support will never ask for the number.

string"Never type a number someone sent you by call or message.…
burstWarning

Warning for many requests in a short time.

string"{count} sign-in requests in 15 minutes. If they aren't y…
unusualText

Flag for an unusual location.

string"Not where you usually sign in"
approveLabel

Label of the approve button.

string"Approve"
notMeLabel

Label of the deny button.

string"This wasn't me"
noNumberLabel

Label for "I don't see a number".

string"I don't see a number"
wrongText

Shown after a wrong number.

string"That number doesn't match. {left} left."
approvedText

Shown after approving.

string"Approved. You're signed in on {device}."
deniedText

Shown after denying.

string"Blocked. Nobody got in. Your password may be known, so c…
expiredText

Shown when the request expired.

string"This request expired and nobody got in."
secureLabel

Label of the secure-my-account button.

string"Secure my account"
accountLabel

Used for `{app}` when the request names none.

string"your account"
locationLabel

Term for the location row.

string"Location"
deviceLabel

Term for the device row.

string"Device"
expiresLabel

Label before the expiry countdown.

string"Expires in"

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

How is Sign-in Approve accessible?

  • Section labelled by its title; details in a <dl>
  • Focus moves to the number input on open and to the result (role=status) when finished
  • Unusual location shown with an icon and text
  • Secure-my-account is a labelled button

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: Verify the number, enforce attempts and expiry, and rate-limit push requests on the server; deny means kill the pending session.

  • Number checking and attempt limits run through your onApprove; the server must enforce them
  • Location is approximate and IP-based
  • Does not send or create the request

What expensive mistakes does Sign-in Approve stop?

Helps prevent approving an attacker's sign-in through push fatigue

Also known as

mfa · 2fa · push approval · number matching · login approval · authenticator · is this you · sign-in request

Field type

What dependencies does Sign-in Approve require?

Sign-in Approve facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameSign-in Approve
Registry identifier@bollard/sign-in-approve
Install commandnpx shadcn@latest add @bollard/sign-in-approve
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 Sign-in Approve

How does Sign-in Approve protect destructive mutations?

Sign-in Approve prevents approving an attacker's sign-in through push fatigue. Enforces deliberate friction against Approvals without seeing the sign-in screen (number matching), Unusual locations far from normal sign-ins, Bursts of requests in the last 15 minutes, Someone claiming to be support asking for the number, Wrong numbers, stopping after maxAttempts, Expired requests. Limitation: authorize sign-in-approve mutations on the server.

How do I install sign-in-approve with shadcn?

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

What props customize Sign-in Approve?

Sign-in Approve accepts `request`, `onApprove`, `onDeny`, `onSecure`, `maxAttempts`. Configures mfa, 2fa, push approval behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of sign-in-approve?

Number checking and attempt limits run through your onApprove; the server must enforce them. Location is approximate and IP-based. Does not send or create the request Server requirement: Verify the number, enforce attempts and expiry, and rate-limit push requests on the server; deny means kill the pending session.

How does Sign-in Approve meet accessibility guidelines?

Section labelled by its title; details in a <dl>. Focus moves to the number input on open and to the result (role=status) when finished. Unusual location shown with an icon and text. Secure-my-account is a labelled button. Minimizes errors: mfa fatigue attack, user approved fake login.

Which components pair with Sign-in Approve?