Integrate reCAPTCHA Enterprise into react website
ReCaptchaProvider - Enables a Component to capture recaptcha
import { ReCaptchaProvider } from "mui-extended"; const reCaptchEnabledComponent = ( <ReCaptchaProvider siteKey="<SITE_KEY>">{children}</ReCaptchaProvider> );
siteKey
reCpatcha site key obtained from google clouduseReCaptchaContext - get token on an action within the reCaptcha Enabled Component
import { useReCaptchaContext } from "mui-extended"; // with in a child component const recaptchaContext = useReCaptchaContext(); /** * Get a token for an action * pass this token to your api. * api must verify this token to analyse if this api call is a bot or human */ const token = await recaptchaContext.getToken("LOGIN");
Write an email to opensource@sodaru.com