import { MultiFactorAuthMethodType } from '/lib/types.ts'; import PasswordlessPasskeyLogin from '/islands/auth/PasswordlessPasskeyLogin.tsx'; interface MultiFactorAuthVerifyFormProps { email: string; redirectUrl: string; availableMethods: MultiFactorAuthMethodType[]; error?: { title: string; message: string }; } export default function MultiFactorAuthVerifyForm( { email, redirectUrl, availableMethods, error }: MultiFactorAuthVerifyFormProps, ) { const hasPasskey = availableMethods.includes('passkey'); const hasTotp = availableMethods.includes('totp'); return (

Multi-Factor Authentication

You are required to authenticate with an additional method

{error ? (
{error.title}: {error.message}
) : null} {hasTotp ? (
) : null} {hasTotp && hasPasskey ? (

or

) : null} {hasPasskey && email ? (
) : null}
Back to Login
); }