import React from "react"; import { ScrollView } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; import { StatusBar } from "expo-status-bar"; import { useColorScheme } from "nativewind"; import { MutedText, Text } from "../../components/text"; import { Button } from "../../components/button"; import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "../../components/card"; export interface PasskeyEnrollScreenProps { /** Start the WebAuthn registration ceremony (host app owns the ceremony). */ onEnroll: () => void; /** Continue without enrolling a passkey. */ onSkip: () => void; isLoading?: boolean; error?: string; } /** * Standalone passkey (WebAuthn) enrollment prompt — offered after sign-in so a * user can add a passkey without going through account settings. Presentational: * the host app runs the actual `navigator.credentials` ceremony via its * AuthService and drives navigation on enroll / skip. */ export function PasskeyEnrollScreen({ onEnroll, onSkip, isLoading, error, }: PasskeyEnrollScreenProps) { const { colorScheme } = useColorScheme(); const isDark = colorScheme === "dark"; return ( Add a passkey Sign in faster and more securely next time with a passkey — your device unlocks it with your fingerprint, face, or PIN. No password to remember or phish. {error ? ( {error} ) : ( You can always add or remove passkeys later in your account settings. )} ); } export default PasskeyEnrollScreen;