"use client" import { useState } from "react" import { KeyRound, Check, Loader2, Fingerprint } from "lucide-react" import { authClient } from "@/lib/auth-client" interface PasskeySetupStepProps { onSuccess: () => void onSkip: () => void } export default function PasskeySetupStep({ onSuccess, onSkip, }: PasskeySetupStepProps) { const [isLoading, setIsLoading] = useState(false) const [error, setError] = useState("") const isPasskeySupported = typeof window !== "undefined" && "PublicKeyCredential" in window const handleAddPasskey = async () => { setIsLoading(true) setError("") const { error } = await authClient.passkey.addPasskey({ name: "Primary passkey", }) setIsLoading(false) if (error) { setError( error.message || "Failed to set up passkey. You can try again later.", ) return } onSuccess() } return (
Sign in faster with biometrics or your device's security key. No password needed.
Passkeys are not supported on this device.