Authentication & Onboarding

React Sign-up & Login Form Guardrails

Sign-up and login components catch typo-prone email addresses, unreachable phone numbers, weak passwords, and fumbled OTP paste values before accounts are created. They keep the user's input intact while guiding corrections.

Sign-up kit

Typo'd emails, unreachable numbers, weak passwords and fumbled codes.

pnpm dlx shadcn@4.21.0 add @bollard/signup-login-pack

Components in Sign-up & login (37)

React 19+ · Tailwind v4 · shadcn
Recovery Contact CooldownStyled

Makes a pending recovery email or phone change visible during its hold, so the real owner can cancel a takeover attempt in time.

Stops: Helps the owner catch a swapped recovery contact before it takes effect
Session ListStyled

Keeps the current device safe while cleaning up sessions: it's pinned and marked, excluded from "sign out all others", and confirmed inline.

Stops: Signed out own device by mistake
Sign-in ApproveStyled

Replaces one-tap sign-in approval with typing the number shown on the sign-in screen, to make MFA-fatigue approvals harder.

Stops: Helps prevent approving an attacker's sign-in through push fatigue
Reauth GateStyled

Asks the user to re-confirm with a passkey, password or PIN before a sensitive action, so an unattended signed-in screen is harder to misuse.

Stops: Helps prevent a sensitive action on an unattended signed-in screen
Cooldown ButtonStyled

A button that waits longer after each attempt and shows why, so "Resend code" and retries aren't tapped repeatedly by accident.

Stops: Resend tapped again and again
KYC Name MatchStyled

Compares the typed name with each KYC document word by word and checks the PAN letters, so a KYC or PAN–Aadhaar link doesn't fail on a name mismatch.

Stops: Helps prevent a KYC rejection for a name mismatch
Aadhaar InputStyled

An Aadhaar field that masks the number as it is typed and catches typos, pasted VIDs, PANs or mobile numbers before KYC rejects them.

Stops: Aadhaar typos and over-exposure
Password Policy InputStyled

Reads an admin's password rules back against NIST SP 800-63B-4 and shows what they do to real passwords, so the rules don't make accounts weaker.

Stops: Helps catch password rules that weaken accounts
Password Hint GuardStyled

Spots the password inside a password hint or security answer, even reversed, spaced out or in leetspeak, without ever showing the password.

Stops: Password hint reveals the password
Email InputStyled

Spots misspelled email domains like gmial.con and offers a one-tap fix, never an automatic one, so sign-ups don't bounce.

Stops: Signup lost to gmial.con typo
Password InputStyled

Warns about Caps Lock, a non-Latin keyboard layout and pasted spaces as they happen, so a typo doesn't look like a wrong password.

Stops: Lockout caused by Caps Lock
Match FieldStyled

Shows which character a confirmation stops matching at, without revealing either value, so a mistyped password or account number is caught.

Stops: Mistyped confirm password or account number
OTP Paste InputStyled

Pulls the right one-time code out of a whole pasted SMS or email, ignoring phone numbers and amounts, and accepts digits in any script.

Stops: OTP verification fails on paste
Phone InputStyled

Cleans pasted phone numbers, picks the country from the dial code and checks the digits against libphonenumber ranges, so an unreachable number isn't saved.

Stops: Unreachable phone number saved
Name InputStyled

Spots caps lock, all-lowercase, stray digits and swapped first/last names, and offers (never forces) a correctly cased fix.

Stops: Names saved in caps or swapped
Homoglyph GuardStyled

Flags look-alike, mixed-script, styled and invisible characters in usernames and domains, such as pаypal.com with a Cyrillic а.

Stops: Helps catch a spoofed username with Cyrillic letters
Username InputStyled

Reads back the exact handle that will be registered and blocks reserved words, case-only duplicates and lookalikes of existing names.

Stops: Handle impersonates someone else
Doc Upload MatchStyled

Checks an uploaded file against the document asked for, so a KYC upload isn't rejected days later for being the wrong side, locked or blurry.

Stops: Wrong document uploaded for KYC
Redirect URI InputStyled

Catches OAuth redirect URIs that are close to but not exactly the registered one, plus unsafe ones like localhost in production or wildcards.

Stops: OAuth redirect_uri_mismatch error
Passkey Name PromptStyled

Prefills a distinct name right after a passkey is created, so the security page isn't a list of identical "Passkey" rows nobody can tell apart.

Stops: Identical passkeys nobody can tell apart
Backup CodesStyled

Makes users save their recovery codes and type one back before continuing, so they aren't locked out later by codes they never kept.

Stops: Locked out with unsaved backup codes
Recovery CheckStyled

Shows what would lock a user out if they lost their phone: stale recovery contacts, no backup method, or one phone holding both keys.

Stops: Lost phone meant lost account
Error SummaryStyled

A GOV.UK-style error summary that takes focus on submit, links each error to its field and ticks errors off as they are fixed.

Stops: Users miss errors on long forms
Terms ChangesStyled

Shows what changed in updated terms since the version a user accepted, and keeps Accept locked until each change has been on screen.

Stops: Terms accepted without seeing changes
Consent GroupStyled

Consent checkboxes that are never pre-ticked and keep required terms apart from optional purposes, and record what was agreed and when.

Stops: Pre-ticked consent bundled with terms
DOB InputStyled

Reads a birth date and age back as it is typed and catches this year typed by habit, future dates and impossible ages, so birth dates aren't saved wrong.

Stops: Birth year typed as this year
Step InvalidationStyled

Says which later wizard answers an earlier change will clear before it applies, then walks back through only those steps.

Stops: Earlier wizard change broke later steps
Security Event LogStyled

Highlights risky account changes from other devices and groups a takeover-shaped burst, with a "This wasn't me" path the user can review.

Stops: Account takeover buried in the activity log
Session TimeoutStyled

Warns before an idle session expires and lets the user stay signed in, so a timeout doesn't silently lose unsaved work.

Stops: Logged out and lost unsaved work
Account Switch GuardStyled

Names which account an action runs as, and notices when another tab switched accounts, so nobody posts from the wrong one.

Stops: Posted from the wrong account
Permission Pre-AskStyled

Explains why a permission is needed before the browser's one-shot prompt, and shows this browser's re-enable steps if it is blocked.

Stops: Wasted the browser's one permission prompt
Clock SkewStyled

Detects when a device clock is off from server time, says what breaks and corrects countdowns, so OTP codes and timers don't fail mysteriously.

Stops: Wrong phone clock breaks OTP codes
Private Mode NoticeStyled

Warns before someone relies on drafts or "Remember me" in a browser that won't keep them, after testing that storage really works.

Stops: Drafts vanish in incognito
Retry AfterStyled

Turns a 429/503 into a clear wait: which limit was hit, when it resets, a countdown, and one automatic retry instead of impatient re-clicks.

Stops: Retry spam extends the lockout
OTP Share GuardStyled

Says in one sentence what a one-time code really approves and warns hard during a call or screen share, so it's less likely to be read out to a scammer.

Stops: Helps stop an OTP being read out to a scammer
Set-Cookie CheckStyled

Reads back what the browser will really do with each Set-Cookie and flags attributes that get it rejected or exposed.

Stops: Login cookie silently rejected
useBollardFieldHeadless

Add touched, async-safe validation state and accessible error props to any React control without changing UI libraries.

Frequently Asked Questions about Sign-up & login Guardrails

How do I detect email domain typos like gmial.com in React?

Email Input (`email-input`) suggests known domain corrections like gmail.com without rewriting what the user typed. Install with `npx shadcn@4.21.0 add @bollard/email-input`. Limitation: format checking does not guarantee the mailbox is active or owned by the registrant.

How do I prevent OTP paste errors in authentication flows?

Otp Input (`otp-input`) splits pasted verification codes across discrete inputs without dropping digits. Install with `npx shadcn@4.21.0 add @bollard/otp-input`. Limitation: OTP generation and rate limiting must be managed by your auth provider.

How do I warn users about weak or compromised passwords?

Password Strength Meter (`password-strength-meter`) computes password entropy and checks common dictionary words locally. Install with `npx shadcn@4.21.0 add @bollard/password-strength-meter`. Limitation: does not replace server-side checks against pwned credential databases.

How do I handle international phone numbers and prefixes?

Phone Input (`phone-input`) standardizes country dialing codes and E.164 formats. Install with `npx shadcn@4.21.0 add @bollard/phone-input`. Limitation: does not confirm line connectivity without SMS verification.