New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

human-proof

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

human-proof

Privacy-first protocol for hardware-verified human presence

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

Human-Proof Logo

⬡ Human-Proof

CI npm version License: MIT

Privacy-First Protocol for Hardware-Verified Human Liveness

Human-Proof is an open-source protocol and SDK designed to solve the problem of automated bot abuse (sybil attacks, spam, voting manipulation) by shifting the security perimeter from Identity to Physical Presence.

By leveraging native WebAuthn (FIDO2) capabilities, Human-Proof generates cryptographic proofs that an action was performed by a human physically interacting with a hardware Root of Trust (Secure Enclave, TPM), without ever collecting biometrics or PII.

⚡ Key Features

  • Privacy-Preserving: Zero-knowledge liveness. No fingerprints, facial data, or IDs leave the user's device.
  • Bot-Resistant: Neutralizes AI agents and headless browsers by requiring hardware-backed assertions.
  • Pluggable Storage: Use the default MemoryStore or implement the IHumanStore for Redis, SQL, or MongoDB.
  • Hardware Trust Tiers: Distinguish between high-security smartphones (Secure Enclave) and standard authenticators.
  • Zero-Dependency SDK: Lightweight browser SDK with no external dependencies.
  • Developer-Centric: Simple Express middleware and React-friendly hooks.

🏗️ Architecture

Human-Proof operates as a stateless challenge-response protocol:

  • Enrollment: User registers a "Human-Key" on their device's secure hardware.
  • Challenge: Server issues an action-scoped, short-lived (60s) challenge.
  • Assertion: User provides a biometric/PIN-unlocked signature from the hardware module.
  • Verification: Server validates the signature and hardware attestation to confirm liveness.

Explore the Architecture Docs for sequence diagrams and deep dives.

🚀 Getting Started

Installation

npm install human-proof

Server-Side Configuration (Express)

import { HumanProof, createHumanProofMiddleware } from "human-proof/server";

const humanProof = new HumanProof({
  rpId: "example.com",
  rpName: "My Application"
});

const requireHuman = createHumanProofMiddleware(humanProof);

// Protect sensitive endpoints
app.post("/api/vote", requireHuman("vote:submit"), (req, res) => {
  const { result } = req.humanProof!;
  res.json({ success: true, trustTier: result.trustTier });
});

Automated Human Verification

import { HumanProofSDK } from "human-proof";

const sdk = new HumanProofSDK({ rpId: "example.com" });

// Automatically attaches human liveness proof to the request
await sdk.protectedFetch("/api/secure-action", {
  method: "POST",
  body: JSON.stringify({ data: "..." }),
  action: "secure:execute"
});

React Hook integration

import { useHumanProof } from "human-proof";

function VoteButton() {
  const { execute, isBusy } = useHumanProof({ rpId: "example.com" });
  
  const handleVote = async () => {
    await execute("vote:submit", async () => {
      // Your protected API call here
    });
  };

  return <button onClick={handleVote} disabled={isBusy}>Vote</button>;
}

Client-Side (Browser SDK)

import { HumanProofSDK } from "human-proof/sdk";

const sdk = new HumanProofSDK({ rpId: "example.com" });

// Enrollment (once per device)
await sdk.enroll({ userId: "user@example.com" });

// Protected Action
await sdk.protectedFetch("/api/vote", {
  method: "POST",
  body: JSON.stringify({ choice: "A" }),
  action: "vote:submit"
});

📖 Documentation

🧪 Development & Testing

We use Vitest for testing and tsup for high-performance builds.

npm install     # Install dev dependencies
npm test        # Run unit tests
npm run dev     # Launch the premium demo server (http://localhost:3000)
npm run build   # Generate dual-mode (ESM/CJS) bundles

⚖️ License

MIT © Human-Proof Team

Keywords

webauthn

FAQs

Package last updated on 27 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts