Google reCAPTCHA
Community-contributed integration
This integration is community-maintained. Reference: ory/integrates/fraud-bot-protection/recaptcha.
Google reCAPTCHA is a CAPTCHA service that comes in three variants: v2 (checkbox and image challenges), v3 (invisible scoring from 0.0 to 1.0), and Enterprise (additional signals).
How it works
- Registration / login UI embeds the reCAPTCHA client widget (v2 or v3); widget returns a token (
g-recaptcha-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://www.google.com/recaptcha/api/siteverifywith the token + Secret Key. - For v3, handler also checks the returned
scoreagainst a threshold (typical: 0.5). - On fail, handler returns an error and Ory blocks.
Notable
- Two keys: Site Key (public) and Secret Key (server).
- reCAPTCHA v3 returns a score (0.0–1.0); higher = more human. Tune threshold per flow risk profile.
- reCAPTCHA Enterprise has a different API surface (
recaptchaenterprise.googleapis.com) and returns richer signals.
