import { AuthAPI } from "@/lib/api/client"; import LoginHeader from "./LoginHeader"; import { Button } from "@/components/ui/button"; import { startAuthentication } from "@simplewebauthn/browser"; export default function PasskeyLoginPage() { return ( <>
还没想好这里放点啥捏~
) } export async function handleSubmit() { const optionsJSON = await AuthAPI.getLoginByPasskeyOptions(); const credentialResponse = await startAuthentication({ optionsJSON }); return AuthAPI.loginByPasskey(credentialResponse); }