Skip to main content

NestJS Captcha Module

nestjs-captcha-module is a lightweight captcha verification module for NestJS.

It provides a provider-based structure so your applications can:

  • verify captcha tokens (e.g. Google reCAPTCHA)
  • protect HTTP routes using a guard
  • keep captcha verification logic behind a simple CaptchaService interface

Supported versions

  • NestJS: v10.x (package dependencies target @nestjs/common and @nestjs/core ^10)
  • Node.js: the version supported by your NestJS v10 setup

Features

  • ✅ Provider-based design (current provider: reCAPTCHA)
  • CaptchaGuard for route protection
  • ✅ Configurable token location (header/body) and field name
  • ✅ Uses @nestjs/axios under the hood for reCAPTCHA verification