google-captcha-hook
v1.0.5
Published
Minimal Invisible google reacaptcha for react ✨
Downloads
4
Readme
📦 Installation
npm i google-captcha-hook
yarn add google-captcha-hook
pnpm add google-captcha-hook
bun i google-captcha-hook
✨ Feature list
- [x] Typescript support
- [x] Regenerate Token
- [x] Super minimal package
📝 Usage
import { useGoogleRecaptcha } from 'google-captcha-hook';
export const App = () => {
const { token } = useGoogleRecaptcha('your google recaptcha v3 site key');
};
📄 API
in reCaptcha create v3 google recaptcha copy your site key and pass to argument of hook
const { token } = useGoogleRecaptcha(SITE_KEY);
| Name | Type | Description |
| ---------- | ------------ | -------------------------------------- |
| token | string | generated token by google v3 recaptcha |
| regenerate | () => void
| regenerate token if it expired or not |