@humanproof/react
v0.1.0
Published
React components for action-bound HumanProof presence verification.
Readme
@humanproof/react
React integration for HumanProof action-bound human-presence verification.
Install
pnpm add @humanproof/reactUsage
Create a verification session from your server, then pass its safe client response to the component:
import { HumanProofVerification } from "@humanproof/react";
<HumanProofVerification
sessionId={session.id}
sessionToken={session.clientToken}
verificationUrl={session.verificationUrl}
onVerified={(proof, details) => {
// Send the proof to your backend. Never execute the sensitive action here.
approveOnYourServer({ proof, sessionId: details.sessionId });
}}
onError={({ code, message }) => console.error(code, message)}
onClose={() => setVerificationOpen(false)}
/>;Your HumanProof API key must remain on the server. The browser receives only a session-scoped client token and the final short-lived proof.
This package is a developer preview. HumanProof presence verification is not identity verification.
