Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.19 KB

README.md

File metadata and controls

49 lines (33 loc) · 1.19 KB

Google Captcha Hook

invisible google captcha hook for React & Next.js

📦 Installation

npm i google-captcha-hook

yarn add google-captcha-hook

pnpm add google-captcha-hook

bun i google-captcha-hook

✨ Feature list

  • Typescript support
  • Regenerate Token
  • 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