Google reCAPTCHA

How to integrate Google reCAPTCHA in your application.

Register a new site

Select Create button inside the Register a new site section.

Google reCAPTCHA Home

Add your domain and select the reCAPTCHA v3 type.

reCAPTCHA v2 is not supported!

In VitNode, we want to move forward with the latest technologies and standards. Therefore, we do not support reCAPTCHA v2.

Add keys to .env

Add the keys to your .env file.

RECAPTCHA_SITE_KEY=XXX
RECAPTCHA_SECRET_KEY=XXX

Provide keys to VitNode

src/vitnode.api.config.ts
import { buildApiConfig } from '@vitnode/core/vitnode.config';

export const vitNodeApiConfig = buildApiConfig({
  captcha: {
    type: 'recaptcha_v3',
    siteKey: process.env.RECAPTCHA_SITE_KEY,
    secretKey: process.env.RECAPTCHA_SECRET_KEY,
  },
});