npm i google-captcha-hook
yarn add google-captcha-hook
pnpm add google-captcha-hook
bun i google-captcha-hook
- Typescript support
- Regenerate Token
- Super minimal package
import { useGoogleRecaptcha } from 'google-captcha-hook';
export const App = () => {
const { token } = useGoogleRecaptcha('your google recaptcha v3 site key');
};
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 |