steep components
All components

AuthForm

Sign-in or sign-up form with email/password + OAuth provider slots.

components/auth-form.tsxPeer deps: lucide-react

Live preview

Welcome back

Sign in to access your downloads, orders, and library.

or with email
Forgot?

Usage

import { AuthForm } from "@/components/auth-form";
import { GoogleIcon, GithubIcon } from "@/components/icons";

<AuthForm
  mode="signin"
  onSubmit={async (email, pw) => {
    const { error } = await supabase.auth.signInWithPassword({ email, password: pw });
    return error ? { ok: false, error: error.message } : { ok: true };
  }}
  oauthProviders={[
    { id: "google", label: "Google", icon: <GoogleIcon />, onClick: signInWithGoogle },
    { id: "github", label: "GitHub", icon: <GithubIcon />, onClick: signInWithGithub },
  ]}
/>