Skip to content

nwehner/react_helmet_recaptcha_v3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Set 'RECAPTCHA_SITE' environment variable with your ReCaptcha Site Key (*not* your secret key)

Import { LoadReCaptcha } to include the ReCaptcha script on any pages where you need to run ReCaptcha.
Place `<LoadReCaptcha />` on the page.

Import { runReCaptcha } to programmatically-invoke ReCaptcha on an action, e.g. after a user submits a form.
Use like: `runReCaptcha('action').then((token) => // Send token to your backend to verify ).catch((reason) => // Handle ReCaptcha errors)`

Import { RunReCaptcha } to execute ReCaptcha automatically just when the component loads.
E.g. place this component on your homepage: `<RunReCaptcha action='homepage'>` to execute runReCaptcha when a user loads your homepage.

About

Google ReCaptcha V3 for React Native

Resources

License

Stars

Watchers

Forks

Packages

No packages published