Skip to main content

reCAPTCHA Package

Package: @nauth-toolkit/recaptcha
Type: Provider Package

Google reCAPTCHA bot protection with support for v2 (checkbox), v3 (score-based), and Enterprise.

Installation

npm install @nauth-toolkit/recaptcha
```

Quick Start

import { NAuthModule } from '@nauth-toolkit/nestjs';
import { RecaptchaEnterpriseProvider } from '@nauth-toolkit/recaptcha';

@Module({
imports: [
NAuthModule.forRoot({
recaptcha: {
enabled: true,
provider: new RecaptchaEnterpriseProvider({
projectId: process.env.RECAPTCHA_PROJECT_ID!,
apiKey: process.env.RECAPTCHA_API_KEY!,
siteKey: process.env.RECAPTCHA_SITE_KEY!,
}),

minimumScore: 0.5,
},
}),
],
})
export class AppModule {}

Providers

Version Comparison

Featurev2v3Enterprise
User InteractionYes (checkbox)NoNo
Score-basedNoYesYes
Custom RulesNoNoYes
AnalyticsBasicBasicAdvanced
SLANoNoYes
Setup ComplexityLowMediumHigh

When to Use

  • v2: Simple protection, acceptable user friction
  • v3: Invisible protection, score-based decisions
  • Enterprise: High-traffic, advanced security, compliance needs