{"_id":"@app2one/react-native-recaptcha-that-works","_rev":"2-eb486b655cb60ff25236c3d11a197508","name":"@app2one/react-native-recaptcha-that-works","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"@app2one/react-native-recaptcha-that-works","version":"1.1.0","private":false,"description":"⚛ A reCAPTCHA bridge for React Native that works.","repository":{"type":"git","url":"git+https://github.com/douglasjunior/react-native-recaptcha-that-works.git"},"main":"index.js","types":"index.d.ts","keywords":["react-native","ios","android","recaptcha"],"author":{"name":"Douglas Nassif Roma Junior","email":"nassifrroma@gmail.com","url":"http://smarppy.com"},"license":"MIT","bugs":{"url":"https://github.com/douglasjunior/react-native-recaptcha-that-works/issues"},"homepage":"https://github.com/douglasjunior/react-native-recaptcha-that-works","peerDependencies":{"react":">=16.9.0","react-native":">=0.60.0","react-native-webview":">=10.0.0"},"_id":"@app2one/react-native-recaptcha-that-works@1.1.0","_nodeVersion":"14.5.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-edxakdN0Jw6IjwI4tSoqg9nJ15x9XSFoPSNyD1fidRWTzrJLtRde5QgCUCVEcKF+14tikkJ1SB3HI6rRRs8LeQ==","shasum":"42c4f5a2ff44c8bfc314af377d2980960d31dc4f","tarball":"https://registry.npmjs.org/@app2one/react-native-recaptcha-that-works/-/react-native-recaptcha-that-works-1.1.0.tgz","fileCount":8,"unpackedSize":23657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJiNcCRA9TVsSAnZWagAAerkP/3VHS9IznR7Stb7xiD6Z\nHtQgIwop/31m6QsBPY++tsa7tNYVUqi1BgADBfTGuKBBYyuy+0k+FQD3nOIT\n9dDoKgafDTrDPQkF+NYbA8C9CXGEvvgclJOY9R1kSAsWggC4Bt2gGto26FKJ\noSc9O3NzE/t6G4mkn8PmBYGAf2DmUoharqy8HaLAP+iogzZ7iaidpSOT2I3u\n8l7OmMeudsCBZwXK67wF1/23Jrk7hxcRHlOgJnEZAwL8pHat0GMri9MHeaXl\nB58Bvk37hP0NgeFpLlEfc2Ji0aNTe2sdZjqfHk0bIPffRb+SLggosW7MB1bd\nDGiLgcqW3POe/c3GwBoTmskJfiZO+vMgQ6zxsYD+LwAqMVt46PAX2kNbCIWA\n1aCUi9DwigWs0llNgOGRi5n/AH0obg2tEWTnEXqkwzSoEgDm97FFPZcLyfSs\nQD/GMgbkig6spQWtdG/nNYlGu+Fe3WudJO6lqEXL73trY4GYWGmPTdcsG/ib\nClG5Pn5fvkxwyJbLIWWsIZN97WNbK5WgAYVopsnLv2YwkcCK0v+l2h0huewF\nbXvLB0FO/iheaMxRTFLYtjqc5qPiG1W2KjsLGFtsVUR58AZW1XDHhLxZ6bvQ\nLlK59iJd21b4+A3/eOWTB/zvqO9ud8bxDBwTOrNrTsbN+bTG7VP5pzloUiWS\neo1B\r\n=vNq4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGcBS+6uFW+vJV7wexjZAsSQGLk6NaVWUEtBN3nL/M4/AiBUtP6rMKbNJMkOep/COgoVdqq7mCJhzhZIfaGLrbdQ3Q=="}]},"_npmUser":{"name":"plamapp2one","email":"plam@app2one.com"},"directories":{},"maintainers":[{"name":"mtsui","email":"mtsui@app2one.com"},{"name":"plamapp2one","email":"plam@app2one.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-recaptcha-that-works_1.1.0_1613112155624_0.8829727157571132"},"_hasShrinkwrap":false}},"time":{"created":"2021-02-12T06:42:35.456Z","1.1.0":"2021-02-12T06:42:35.784Z","modified":"2022-04-04T14:43:28.118Z"},"maintainers":[{"email":"plam@app2one.com","name":"plamapp2one"}],"description":"⚛ A reCAPTCHA bridge for React Native that works.","homepage":"https://github.com/douglasjunior/react-native-recaptcha-that-works","keywords":["react-native","ios","android","recaptcha"],"repository":{"type":"git","url":"git+https://github.com/douglasjunior/react-native-recaptcha-that-works.git"},"author":{"name":"Douglas Nassif Roma Junior","email":"nassifrroma@gmail.com","url":"http://smarppy.com"},"bugs":{"url":"https://github.com/douglasjunior/react-native-recaptcha-that-works/issues"},"license":"MIT","readme":"# reCAPTCHA for React Native (Android and iOS)\n\n[![Licence MIT](https://img.shields.io/badge/licence-MIT-blue.svg)](https://github.com/douglasjunior/react-native-recaptcha-that-works/blob/master/LICENSE)\n[![npm version](https://img.shields.io/npm/v/react-native-recaptcha-that-works.svg)](https://www.npmjs.com/package/react-native-recaptcha-that-works)\n[![npm downloads](https://img.shields.io/npm/dt/react-native-recaptcha-that-works.svg)](#install)\n\nA reCAPTCHA library for React Native (Android and iOS) that works.\n\n| Normal | Invisible |\n| - | - |\n| <img src='https://raw.githubusercontent.com/douglasjunior/react-native-recaptcha-that-works/master/screenshots/normal.gif' width='240' /> | <img src='https://raw.githubusercontent.com/douglasjunior/react-native-recaptcha-that-works/master/screenshots/invisible.gif' width='240' /> |\n\n_Looking for [React DOM version](https://github.com/douglasjunior/react-recaptcha-that-works)?_\n\n## Install \n\n### Install the module \n\n```bash\n  yarn add react-native-recaptcha-that-works react-native-webview\n```\nOr\n```bash\n  npm i -S react-native-recaptcha-that-works react-native-webview\n```\n\n_See the [`react-native-webview` Getting Started Guide](https://github.com/react-native-community/react-native-webview/blob/master/docs/Getting-Started.md)._\n\n## Usage\n\nWith <strong>JavaScript</strong>:\n\n```jsx\nimport React, { useRef } from 'react';\nimport { View, Button } from 'react-native';\n\nimport Recaptcha from 'react-native-recaptcha-that-works';\n\nconst App = () => {\n    const recaptcha = useRef();\n\n    const send = () => {\n        console.log('send!');\n        this.recaptcha.current.open();\n    }\n\n    const onVerify = token => {\n        console.log('success!', token);\n    }\n\n    const onExpire = () => {\n        console.warn('expired!');\n    }\n\n    return (\n        <View>\n            <Recaptcha\n                ref={recaptcha}\n                siteKey=\"<your-recaptcha-public-key>\"\n                baseUrl=\"http://my.domain.com\"\n                onVerify={onVerify}\n                onExpire={onExpire}\n                size=\"invisible\"\n            />\n            <Button title=\"Send\" onPress={send} />\n        </View>\n    );\n}\n```\n\n<details>\n    <summary>Or with <strong>TypeScript</strong>:</summary>\n  \n```tsx\nimport React, { useRef } from 'react';\nimport { View, Button } from 'react-native';\n\nimport Recaptcha, { RecaptchaHandles } from \"react-native-recaptcha-that-works\";\n\n// ...\n\nexport const Component: React.FC = () => {\n    const recaptcha = useRef<RecaptchaHandles>();\n\n    const send = () => {\n        console.log('send!');\n        recaptcha.current?.open();\n    };\n\n    const onVerify = (token: string) => {\n        console.log('success!', token);\n    };\n\n    const onExpire = () => {\n        console.warn('expired!');\n    }\n\n    return (\n        <View>\n            <Recaptcha\n                ref={recaptcha}\n                siteKey=\"<your-recaptcha-public-key>\"\n                baseUrl=\"http://my.domain.com\"\n                onVerify={onVerify}\n                onExpire={onExpire}\n                size=\"invisible\"\n            />\n            <Button title=\"Send\" onPress={send} />\n        </View>\n    );\n};\n```\n</details>\n\n<br />\n\nFor more details, see the [Sample Project](https://github.com/douglasjunior/react-native-recaptcha-that-works/blob/master/Sample/src/App.js) or try the [Online demo](https://snack.expo.io/@douglasjunior/a6aed2).\n\n## Props\n\n|Name|Value|Default|Description|\n|-|-|-|-|\n|lang|`string`||[Language code](https://developers.google.com/recaptcha/docs/language).|\n|siteKey|`string`||Your sitekey.|\n|baseUrl|`string`||The URL (domain) configured in the reCAPTCHA setup. (ex. http://my.domain.com)|\n|headerComponent|`React Element`||A component to render on top of Modal.|\n|size|`'invisible'`, `'normal'` or `'compact'`|`'normal'`|The size of the widget.|\n|theme|`'dark'` or `'light'`|`'light'`|The color theme of the widget.|\n|onLoad|`function()`||A callback function, executed when the reCAPTCHA is ready to use.|\n|onVerify|`function(token)`||A callback function, executed when the user submits a successful response. The recaptcha response token is passed to your callback.|\n|onExpire|`function()`||A callback function, executed when the reCAPTCHA response expires and the user needs to re-verify.|\n|onError|`function(error)`||A callback function, executed when reCAPTCHA encounters an error (usually network connectivity) and cannot continue until connectivity is restored. If you specify a function here, you are responsible for informing the user that they should retry.|\n|onClose|`function()`|| A callback function, executed when the Modal is closed.|\n\nNote: If `lang` is not set, then device language is used.\n\n## Methods\n\n|Name|Type|Description|\n|-|-|-|\n|open|`function`|Open the reCAPTCHA Modal.|\n|close|`function`|Close the reCAPTCHA Modal.|\n\nNote: If using `size=\"invisible\"`, then challange run automatically when `open` is called.\n\n## reCAPTCHA v2 docs\n\n- [I'm not a robot](https://developers.google.com/recaptcha/docs/display)\n- [Invisible](https://developers.google.com/recaptcha/docs/invisible)\n\n## Contribute\n\nNew features, bug fixes and improvements are welcome! For questions and suggestions use the [issues](https://github.com/douglasjunior/react-native-recaptcha-that-works/issues).\n\n<a href=\"https://www.patreon.com/douglasjunior\"><img src=\"http://i.imgur.com/xEO164Z.png\" alt=\"Become a Patron!\" width=\"200\" /></a>\n[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=E32BUP77SVBA2)\n\n## Licence\n\n```\nThe MIT License (MIT)\n\nCopyright (c) 2020 Douglas Nassif Roma Junior\n```\n\nSee the full [licence file](https://github.com/douglasjunior/react-native-recaptcha-that-works/blob/master/LICENSE).\n","readmeFilename":"README.md"}