Welcome Back Unlock

JC

Welcome back

Jane Cooper · [email protected]

Not you? Use a different account

About this block

Welcome Back UnlockPRO

Full-height re-authentication screen showing the signed-in user's avatar, name, and email with a single password field, a forgot-password link, and a use-a-different-account option. Perfect for session unlock and returning-user prompts.

Auth8: Welcome Back Unlock

Full-height re-authentication screen for an already-known user: their avatar, name, and email sit above a single password field, a forgot-password link, and a switch-account prompt. There is no email input at all, since the session already knows who is signing back in.

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.

Upgrade Now

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/auth8?email=YOUR_EMAIL&license_key=YOUR_KEY"

Base UI flavor

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

This installs the block to components/beste/block/auth8.tsx and the button, input, field, and avatar shadcn/ui primitives it's built on.

Quick start

The installed file exports auth8Demo alongside the block: the exact props behind the preview above. Spread it to get a working unlock screen in one line.

tsx
import { Auth8, auth8Demo } from "@/components/beste/block/auth8";

export default function UnlockPage() {
  return <Auth8 {...auth8Demo} />;
}

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

tsx
import { Auth8 } from "@/components/beste/block/auth8";

export default function UnlockPage() {
  return (
    <Auth8
      user={{
        name: "Jane Cooper",
        email: "[email protected]",
        avatar: { src: "https://example.com/jane.jpg", alt: "Jane Cooper" },
      }}
      heading="Welcome back"
      forgotPasswordLink={{ label: "Forgot password?", href: "/forgot-password" }}
      switchAccountPrompt={{ text: "Not you?", linkLabel: "Use a different account", href: "/sign-in" }}
      labels={{
        password: "Password",
        passwordPlaceholder: "Enter your password",
        submit: "Continue",
        passwordToggle: "Toggle password visibility",
      }}
    />
  );
}

Props

PropTypeDefaultDescription
userAuth8User–Signed-in user shown above the form (avatar, name, email)
headingstring–Screen title
forgotPasswordLink{ label: string; href: string }–Link shown at the right of the password field label
switchAccountPrompt{ text: string; linkLabel: string; href: string }–Line below the card, hidden entirely when not set
labelsAuth8Labels{}Field/button copy, see below
classNamestring–Extra classes for the outer <section>
ts
type Auth8User = {
  name: string;
  email: string;
  avatar?: { src: string; alt: string };
};

type Auth8Labels = {
  password?: string;
  passwordPlaceholder?: string;
  submit?: string;
  passwordToggle?: string;
};

Behavior notes

  • The <form> only calls e.preventDefault() on submit; there is no onSubmit prop, so nothing actually re-authenticates the user until the integrator wires a handler.
  • The password show/hide toggle is local useState, a type="button" icon button swapping Eye/EyeOff and the input's type between password and text.
  • The avatar only renders when user.avatar is set; its AvatarFallback initials are computed by splitting user.name on spaces and taking each part's first letter.
  • The submit button and password field label each render conditionally on labels.submit and labels.password being present, not through separate boolean props.
  • Unlike the other sign-in blocks in this set, there is no email field or social login row: the layout assumes the identity is already known and only the password needs re-entering.

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

auth17

Signed Out Confirmation

PRO

auth23

Account Locked

FREE

auth4

Forgot Password Request

Get Pro access