Files
WRNexusJS/CAPTCHA-FIXED7-INSTRUCTIONS.md
2026-07-25 13:38:18 +05:30

1.5 KiB

WRNexusJS CAPTCHA Fixed 7

Extract this patch directly into the WRNexusJS repository root and allow files to be replaced.

Added

  • size="compact", size="normal", and size="big"
  • Backward-compatible small/sm, large/lg, and compact="true" aliases
  • showListen="true|false" for the Listen button
  • Existing showAudio="true|false" remains the broader audio-alternative switch
  • Self-hosted type="not-robot" checkbox challenge
  • Showcase examples and tests for all new behavior
  • Managed API/OpenAPI support for not-robot

Usage

<Captcha
  endpoint="/api/captcha/challenge"
  verifyEndpoint="/api/captcha/verify"
  type="number"
  action="compact-example"
  size="compact"
  showListen="false"
/>
<Captcha
  endpoint="/api/captcha/challenge"
  verifyEndpoint="/api/captcha/verify"
  type="not-robot"
  action="contact-submit"
  size="compact"
  showListen="false"
/>

The not-robot checkbox is server verified. It uses a one-time challenge, minimum completion time, honeypot, expiry, attempt limits, action binding, optional hostname/session/IP binding, and a single-use response token. It is a low-friction mode; high-risk traffic should escalate to a visual challenge or an external provider.

Regenerate and test

bun run scripts/generate-ui-component-reference.mjs
bun run typecheck
bun test packages/captcha
bun run --cwd examples/captcha-showcase check
bun run --cwd examples/captcha-showcase dev

Hard-refresh the browser after restarting the development server.