google recaptcha

v2 invisible

The Google reCAPTCHA v2 invisible is a reCAPTCHA version that runs in the background without requiring user interaction. It is used to verify that the user is a human and not a bot.

Demo

Provider Setup

All reCAPTCHA functionality requires wrapping your application with the GoogleReCaptchaProvider. This provider manages the reCAPTCHA script loading and provides context to child components.

import React from 'react';
import {  } from '@google-recaptcha/react';

export const  = () => (
  < ='v2-invisible' ='your_site_key'>
    ...
  </>
);

Usage

Google ReCaptcha v2 invisible does not require users to solve any puzzles or enter any codes. Instead, it runs in the background and analyzes user behavior on the web page to determine if they are genuine users or potential bots.

import React from 'react';
import {  } from '@google-recaptcha/react';

const  = () => {
  const  = ();

  const  = async () => {
    if (!.) {
      .('Execute recaptcha not available');
      return;
    }

    const  = await .();
  };

  return < ={}>verify</>;
};