{"_id":"@adrianso/react-native-recaptchav3","_rev":"1-a63bd6b4961d6ec9457204674f0649e8","name":"@adrianso/react-native-recaptchav3","dist-tags":{"latest":"1.2.2"},"versions":{"1.2.2":{"name":"@adrianso/react-native-recaptchav3","version":"1.2.2","description":"React native component to use the invisible recaptcha v3 from Google","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"dev":"yarn build -watch","build":"tsc","compile":"npm run build","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/adrianso/react-native-recaptchav3.git"},"author":{"name":"Adrian So","email":"adrian@sld.co.nz"},"license":"MIT","bugs":{"url":"https://github.com/adrianso/react-native-recaptchav3/issues"},"homepage":"https://github.com/adrianso/react-native-recaptchav3#readme","devDependencies":{"@types/react":"^18.2.14","react":"^18.2.0","react-native":"^0.72.3","react-native-webview":"^13.3.0","typescript":"^5.1.6"},"peerDependencies":{"react":"*","react-native":"*","react-native-webview":"*"},"gitHead":"8c214bc211922b10fce43399e5ce959088df17fa","_id":"@adrianso/react-native-recaptchav3@1.2.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-PSfhcPnOvLbcm96LWDOcNT4+dbbx3d7AoS//oilFgBaoGr5Br3rfrzuhnsSd7cdBf0lwg1HkYf8emtLj9QgIpg==","shasum":"e2c4a983579211ccd6b31108c4b3e4bdc4a3ba54","tarball":"https://registry.npmjs.org/@adrianso/react-native-recaptchav3/-/react-native-recaptchav3-1.2.2.tgz","fileCount":12,"unpackedSize":15850,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdC0ipCsQKTecKG8q6rZ5auk8cTcbHjSTG9S5miaB7bgIgZdo5LU41T71Hpa4QnHhkJ3SaRl196EG3yacwMnSR33o="}]},"_npmUser":{"name":"adrianso","email":"adrian.so@sld.co.nz"},"directories":{},"maintainers":[{"name":"adrianso","email":"adrian.so@sld.co.nz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-recaptchav3_1.2.2_1690583268328_0.9583809129053009"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-28T22:27:48.260Z","1.2.2":"2023-07-28T22:27:48.507Z","modified":"2023-07-28T22:32:42.201Z"},"maintainers":[{"name":"adrianso","email":"adrian.so@sld.co.nz"}],"description":"React native component to use the invisible recaptcha v3 from Google","homepage":"https://github.com/adrianso/react-native-recaptchav3#readme","repository":{"type":"git","url":"git+https://github.com/adrianso/react-native-recaptchav3.git"},"author":{"name":"Adrian So","email":"adrian@sld.co.nz"},"bugs":{"url":"https://github.com/adrianso/react-native-recaptchav3/issues"},"license":"MIT","readme":"# react-native-recaptchav3\n\n[![npm](https://img.shields.io/npm/v/@adrianso/react-native-recaptchav3.svg)](https://www.npmjs.com/package/@adrianso/react-native-recaptchav3) [![npm](https://img.shields.io/npm/dt/@adrianso/react-native-recaptchav3.svg)](https://www.npmjs.com/package/@adrianso/react-native-recaptchav3)\n\n_React native component to use the invisible reCAPTCHA v3 from Google_\n\nhttps://www.google.com/recaptcha/intro/v3.html\n\n## Installation\n\n```\nnpm install --save @adrianso/react-native-recaptchav3\n```\n\nor\n\n```\nyarn add @adrianso/react-native-recaptchav3\n```\n\n**Note:** React Native Community Webview requires you to link the native dependencies (https://github.com/react-native-community/react-native-webview/blob/master/docs/Getting-Started.md)\n\n## Demo\n\n![automatic](https://user-images.githubusercontent.com/10620919/48578194-e1022c80-e97d-11e8-8bb9-6e96a8a25aec.gif) ![retrybutton](https://user-images.githubusercontent.com/10620919/48578212-ed868500-e97d-11e8-95ab-1d5ec0280b8f.gif)\n\n## Usage\n\nAutomatically get a captcha token:\n\n```\nimport ReCaptchaV3 from '@adrianso/react-native-recaptchav3'\n\n<ReCaptchaV3\n  captchaDomain={'https://yourowndomainname.co.nz'}\n  siteKey={'yourownsitekey'}\n  onReceiveToken={(token: string) => Alert.alert('CAPTCHA', token)}/>\n```\n\nOne could also use a trigger to request a new token using the reference of the component:\n\n```\nimport ReCaptchaV3 from '@adrianso/react-native-recaptchav3'\n\n<ReCaptchaV3\n  ref={(ref: RecaptchaV3) => this._captchaRef = ref}\n  captchaDomain={'https://yourowndomainname.co.nz'}\n  siteKey={'yourownsitekey'}\n  onReceiveToken={(token: string) => Alert.alert('CAPTCHA', token)}/>\n\n<TouchableOpacity onPress={() => this._captchaRef.refreshToken()}>\n  <Text>Retry</Text>\n</TouchableOpacity>\n```\n\n## Options\n\n| Key                  | Description                                                   | Default | Required | Type                             |\n| -------------------- | ------------------------------------------------------------- | ------- | -------- | -------------------------------- |\n| **`captchaDomain`**  | Your url registered with Google reCAPTCHA                     | `None`  | `true`   | `string`                         |\n| **`onReceiveToken`** | The callback used to get the captcha token from the component | `None`  | `true`   | `(captchaToken: string) => void` |\n| **`siteKey`**        | The site key provided by Google reCAPTCHA                     | `None`  | `true`   | `string`                         |\n\n## [Changelog](https://github.com/adrianso/react-native-recaptchav3/blob/master/CHANGELOG.md)\n\n## Contributing\n\nPull requests are welcome.\n\n## [License](https://github.com/adrianso/react-native-recaptchav3/blob/master/LICENSE)\n","readmeFilename":"README.md"}