hCaptcha
Community-contributed integration
This integration is community-maintained. Reference: ory/integrates/fraud-bot-protection/hcaptcha.
hCaptcha is a privacy-focused CAPTCHA service and an alternative to reCAPTCHA. It is GDPR-compliant and does not sell data. The Enterprise tier adds adaptive challenge difficulty.
How it works
- Registration / login UI embeds the hCaptcha client widget; the widget runs the challenge and returns a token
(
h-captcha-response). - Form submits to Ory's flow with the token.
- Ory Action on
registration.before/login.beforewithcan_interrupt: truecalls the handler. - Handler POSTs to
https://hcaptcha.com/siteverifywith the token- hCaptcha Secret; checks
success == true.
- hCaptcha Secret; checks
- On fail, handler returns an error and Ory blocks.
Notable
- Two keys: Site Key (client widget) and Secret (server verify). Never expose Secret.
- Tokens are one-time use and expire 2 minutes after issue.
- The hCaptcha API contract is nearly identical to reCAPTCHA, so you can migrate between the two with minimal changes.
