MUI Extended UI Components

reCAPTCHA


Integrate reCAPTCHA Enterprise into react website

Usage

  • ReCaptchaProvider - Enables a Component to capture recaptcha

    import { ReCaptchaProvider } from "mui-extended"; const reCaptchEnabledComponent = ( <ReCaptchaProvider siteKey="<SITE_KEY>">{children}</ReCaptchaProvider> );

    Props

    • siteKey reCpatcha site key obtained from google cloud
  • useReCaptchaContext - 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");
Does this page need improvements?
Edit This Page in GitHub
Did this page help you?
Provide feedback in the GitHub Discussion Page
Need More help?

Write an email to opensource@sodaru.com