@nauth-toolkit/recaptcha
v0.2.3
Published
reCAPTCHA v3 and Enterprise provider for nauth-toolkit
Maintainers
Readme
@nauth-toolkit/recaptcha
reCAPTCHA provider for nauth-toolkit.
Integrates Google reCAPTCHA v2, v3, and reCAPTCHA Enterprise into nauth-toolkit's authentication flows. Verifies CAPTCHA tokens server-side during signup, login, and other protected endpoints.
Part of nauth-toolkit. Requires
@nauth-toolkit/core.
Install
npm install @nauth-toolkit/recaptchaUsage (reCAPTCHA v3)
import { RecaptchaV3Provider } from '@nauth-toolkit/recaptcha';
const authConfig = {
recaptcha: {
provider: new RecaptchaV3Provider({
secretKey: process.env.RECAPTCHA_SECRET_KEY,
}),
minimumScore: 0.5,
},
};Providers
- RecaptchaV2Provider — checkbox-based verification
- RecaptchaV3Provider — score-based bot detection (invisible)
- RecaptchaEnterpriseProvider — Google Cloud project-based verification with site keys
- Configurable minimum score thresholds
- Per-action score overrides (signup, login, password reset)
Free to use. See license.
