Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 1

Reactjs-Google ReCaptcha v3 'onVerify' method does not trigger for every login click

import React from "react";
import {GoogleReCaptchaProvider, GoogleReCaptcha } from "react-google-recaptcha-v3";

class Login extend React.Component {
   verifyCallback = (response) => {
    // API call to verify the token
   }

    render() {
       return (
          // Here comes a component with email/password and login button
           ....
          <GoogleReCaptchaProvider 
            reCaptchaKey="your-site-key"
            render="explicit">
            <GoogleReCaptcha
                onVerify={this.verifyCallback}
            />
         </GoogleReCaptchaProvider>
       );
   }
}

Here, verifyCallback is triggered when the Google ReCaptcha component is loaded for the first time.

How to trigger verifyCallback for every click of login button?