QR Code Device Login

Sign in with your phone

Scan this code with the Beste app to sign in instantly.

QR code to sign in with the Beste app

Or enter this code in the app

WXYZ-4827

Waiting for confirmation…
About this block

QR Code Device LoginPRO

Full-height cross-device sign-in with a scannable QR code, a manual fallback code, and a live waiting-for-confirmation indicator. Perfect for signing in on desktop by scanning with a phone app.

Auth31: QR Code Device Login

A full-height, centered cross-device sign-in panel that stacks an optional heading and description over a bordered QR image, a monospace manual fallback code with its own label, a pulsing "waiting for confirmation" indicator, and an alternative sign-in link, each section rendered only when its prop is supplied.

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

Base UI flavor

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

This installs the block to components/beste/block/auth31.tsx.

Quick start

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

tsx
import { Auth31, auth31Demo } from "@/components/beste/block/auth31";

export default function Page() {
  return <Auth31 {...auth31Demo} />;
}

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

tsx
import { Auth31 } from "@/components/beste/block/auth31";

export default function Page() {
  return (
    <Auth31
      heading="Sign in with your phone"
      description="Scan this code with the app to sign in instantly."
      qrImage={{ src: "/login-qr.svg", alt: "QR code to sign in" }}
      manualCode="WXYZ-4827"
      labels={{
        manualCodeLabel: "Or enter this code in the app",
        waiting: "Waiting for confirmation…",
      }}
      alternativeLink={{ label: "Sign in another way", href: "/login" }}
    />
  );
}

Props

PropTypeDefaultDescription
headingstringTop-level <h1> title, rendered only when set
descriptionstringMuted subheading under the title
qrImage{ src: string; alt: string }Scannable QR image shown in a bordered card
manualCodestringFallback code shown in monospace with wide tracking
labels{ manualCodeLabel?: string; waiting?: string }{}Text for the code label and the waiting indicator
alternativeLink{ label: string; href: string }Secondary sign-in link at the bottom
classNamestringExtra classes for the outer <section>
ts
type QrImage = {
  src: string;
  alt: string;
};

type Labels = {
  manualCodeLabel?: string;
  waiting?: string;
};

type AlternativeLink = {
  label: string;
  href: string;
};

Behavior notes

  • Every section is independently conditional: heading, description, qrImage, manualCode, the waiting indicator, and alternativeLink each render only when their prop is truthy, so passing nothing yields an empty centered container.
  • The waiting indicator is purely decorative animation: it shows a bg-primary dot with an animate-ping halo but there is no polling, timer, or callback, so real login-confirmation logic and any redirect are left to the integrator.
  • manualCode is displayed as static text in font-mono with tracking-widest; there is no copy-to-clipboard button or interaction attached to it.
  • Inside labels, manualCodeLabel only appears when manualCode is also set (it lives inside the manualCode block), while waiting renders its indicator independently of any other prop.
  • The QR image uses a raw <img> element with qrImage.src passed straight through and a fixed size-44, so no Next.js image optimization or sizing logic is applied.
  • alternativeLink renders a next/link <Link> pointing at href; it performs plain client navigation with no auth handling of its own.
  • The outer <section> is min-h-screen and centers its max-w-sm content both axes, so the block is designed to own a full viewport rather than sit inside a narrow card.

More Auth blocks

View all Auth
PRO

auth15

Phone Number Sign In

Full-height phone-based sign-in with a country-code select paired to a phone number input, a send-code button, and an email fallback link. Perfect for SMS one-time-code authentication flows.

PRO

auth21

Passkey Sign In

Full-height passwordless sign-in screen with a fingerprint icon, a continue-with-passkey button, and a password fallback below a divider. Perfect for WebAuthn and biometric authentication flows.

PRO

auth51

Passwordless Code Sign In

A centered passwordless card that advances in place from a work email step with an SSO fallback to a monospace one-time-code entry with resend and go-back controls.

PRO

auth10

Face ID Sign In

Full-height biometric sign-in with an animated face-scan viewfinder that runs through idle, scanning, and recognized states, plus a continue action and a password fallback. Perfect for Face ID and biometric authentication.

PRO

auth17

Signed Out Confirmation

Full-height signed-out screen with a centered icon, a heading and message, a sign-back-in button, and a return-home link. Perfect for logout confirmations and expired-session pages.

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.