{"_id":"@chaitanyapotti/react-recaptcha-v3","_rev":"1-080a849c4d788c894b9ca7bb1728290e","name":"@chaitanyapotti/react-recaptcha-v3","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"@chaitanyapotti/react-recaptcha-v3","version":"1.1.0","description":"This library helps to integrate google recaptcha into your react project easily. ","keywords":["react","react.js","react-component","ReCaptcha","g-recaptcha","invisible-recaptcha","visible-recaptcha","recaptcha-token"],"main":"dist/index.js","scripts":{"start":"webpack --watch","build":"NODE_ENV=production webpack","lint":"npx eslint ./src","clean":"rm -rf ./package-lock.json ./node_modules/","prepublish":"rm -rf ./dist && npm run build"},"repository":{"type":"git","url":"git+https://github.com/codeep/react-recaptcha-v3.git"},"author":{"name":"Codeep"},"license":"MIT","bugs":{"url":"https://github.com/codeep/react-recaptcha-v3/issues"},"homepage":"https://github.com/codeep/react-recaptcha-v3#readme","peerDependencies":{"react":"^15.6.2 || ^16.x","prop-types":"^15.6.2"},"devDependencies":{"@babel/core":"^7.1.6","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-object-rest-spread":"^7.0.0","@babel/plugin-transform-react-jsx":"^7.1.6","@babel/preset-env":"^7.1.6","@types/acorn":"^4.0.3","@types/eslint":"^4.16.4","@types/prop-types":"^15.5.6","@types/react":"^16.7.7","@types/uglifyjs-webpack-plugin":"^1.1.0","@types/webpack-bundle-analyzer":"^2.13.0","acorn":"^6.0.4","babel-eslint":"^10.0.1","babel-loader":"^8.0.4","babel-plugin-transform-react-remove-prop-types":"^0.4.20","eslint":"^5.9.0","eslint-config-standard":"12.0.0","eslint-config-standard-react":"7.0.2","eslint-import-resolver-webpack":"0.10.1","eslint-plugin-ascii":"^1.0.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-dependencies":"^2.4.0","eslint-plugin-filenames":"^1.3.2","eslint-plugin-html":"^5.0.0","eslint-plugin-import":"2.14.0","eslint-plugin-jsx-a11y":"6.1.2","eslint-plugin-no-inferred-method-name":"1.0.2","eslint-plugin-node":"8.0.0","eslint-plugin-optimize-regex":"^1.1.6","eslint-plugin-promise":"4.0.1","eslint-plugin-promiseparams":"^1.0.8","eslint-plugin-react":"7.11.1","eslint-plugin-react-functional-set-state":"1.2.1","eslint-plugin-react-perf":"2.0.9","eslint-plugin-standard":"4.0.0","prop-types":"^15.6.2","react":"^15.6.2 || ^16.x","uglifyjs-webpack-plugin":"^2.0.1","webpack":"^4.26.0","webpack-bundle-analyzer":"^3.0.3","webpack-cli":"^3.1.2"},"dependencies":{},"sideEffects":false,"gitHead":"35e755d86a3a5649469565cfff31611891dcb207","_id":"@chaitanyapotti/react-recaptcha-v3@1.1.0","_nodeVersion":"12.14.1","_npmVersion":"6.13.6","dist":{"integrity":"sha512-E2Kp6Dx8wLAWUzN5dvHssyx/46dhE8PL+eIKlv3CcqdJ+af9HCCxoZvdp1tfM0WCc6RuMpGT91vS2LP8e0Z6wA==","shasum":"fea5a13c8e919955ef5465d6263b211d17500ff0","tarball":"https://registry.npmjs.org/@chaitanyapotti/react-recaptcha-v3/-/react-recaptcha-v3-1.1.0.tgz","fileCount":8,"unpackedSize":12222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOuA/CRA9TVsSAnZWagAAKZEP/0tXTLU0OcpXbjweTchY\nRE+NeFLMo9zjBcJoTS0uXyu84IuE4G80spRGg5gb8osRmjGokGuQcNnMsvI8\n42Z07QngYECl/Yv+sxAzXMBYeCpCLPt6rJLV+2PF7dAtO9553hUJkSwN10Rk\n4qV/fvyCqNMgLbv7r0MUGDixzcjr4u/2fXPUYMF/AJGMn213KfenzNlu5UTe\np+FGh2UoNYzlRHz0lACtHHb8/249m0VWn1kuaM3EGljBdhNnfZA0/1f5qDKU\nVwCikznytffby1vmz9Ar9BNW03K06jccXduqpIFSx2FcKb3OBbPeo8OM1Wlt\nc3YH1Obw1J8Vp7seUTZeU0g/naiwN5CbAFBnfNyIPQ94X4Aq2mU25p4mPjwj\n7h+e9XUDX6MmS4kzIqD9lFOX5Vp9Md1yY9VPRSbEpUz3L5RtbcZ6/U4iZM7l\niQBF1YwG0WFi3wbQi0u3+tGajEi7cUkc27xE38XJHzk9R8M8ey+c+PJK7lPy\naEa0wIwax/JHwa8PGHTa3zvYnTXtwA0vhkPGmIaAFxqSabVKYBRVudA9pS4W\nsrCZeoZNrPvd7FOI+VRS6QL0v2QR4VPzYeOZ4K32Fklt6/xleUl3uU1p+bps\nBVHM5c4I8v+Beu2horpBL89KWqO/CvuVQtDELhgUs0ylfFPgrv8XaUA1t4BM\nBMqJ\r\n=VZBT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKAuNwvzPCPDjig7DtnTOwHlVsuVUSHeiojKB1Cp/Y8gIhAPzsAZJPIx0RwTxO6HIJi/eNbF1bJrSmKt5JlTyG84I6"}]},"maintainers":[{"name":"chaitanyapotti","email":"chaitanya.potti@gmail.com"}],"_npmUser":{"name":"chaitanyapotti","email":"chaitanya.potti@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-recaptcha-v3_1.1.0_1580916799293_0.7866560180467224"},"_hasShrinkwrap":false}},"time":{"created":"2020-02-05T15:33:19.240Z","1.1.0":"2020-02-05T15:33:19.410Z","modified":"2022-04-04T22:27:51.714Z"},"maintainers":[{"name":"chaitanyapotti","email":"chaitanya.potti@gmail.com"}],"description":"This library helps to integrate google recaptcha into your react project easily. ","homepage":"https://github.com/codeep/react-recaptcha-v3#readme","keywords":["react","react.js","react-component","ReCaptcha","g-recaptcha","invisible-recaptcha","visible-recaptcha","recaptcha-token"],"repository":{"type":"git","url":"git+https://github.com/codeep/react-recaptcha-v3.git"},"author":{"name":"Codeep"},"bugs":{"url":"https://github.com/codeep/react-recaptcha-v3/issues"},"license":"MIT","readme":"# react-recaptcha-v3\n\nThis component is created in order to make the experience of integrating Google ReCaptcha into React apps easier and smoother.\n\nCurrently, we are using ReCaptcha V3, which is still in beta version; so, we will update our component when they release the stable version.\n\nP.S. It will open the ReCaptcha window only when there are some doubts by Google; otherwise, it will automatically generate the recaptcha token.\n\n# Google ReCaptcha V3\n\n## Installation\n\n`npm install react-recaptcha-v3 --save`\n\n## Usage\n\nFirst of all, get your site key for ReCaptcha V3 [here](https://www.google.com/recaptcha/admin#v3signup \"V3 signup\")\n\nThere are two steps that you need to implement.\n\n### 1. Use `loadReCaptcha()` to initialize the ReCaptcha\n\nThis function should be imported and called in the main (parent) component of your app. We recommend calling it in `componentDidMount()` of `App.js`.\n\n```\nimport { loadReCaptcha } from 'react-recaptcha-v3'\n\n...\n\ncomponentDidMount() {\n  loadReCaptcha(your_site_key);\n}\n```\n\n\n### 2. Use `ReCaptcha` to integrate ReCaptcha in a particular component\n\n#### invisible Recaptcha\n\nCreate a new component with the following code and give it a try!\n\n```\nimport React, { Component } from 'react';\nimport { ReCaptcha } from 'react-recaptcha-v3'\n\nclass ExampleComponent extends Component {\n\n  verifyCallback = (recaptchaToken) => {\n    // Here you will get the final recaptchaToken!!!  \n    console.log(recaptchaToken, \"<= your recaptcha token\")\n  }\n\n  render() {\n    return (\n      <div>\n\n        <ReCaptcha\n            sitekey=\"your_site_key\"\n            action='action_name'\n            verifyCallback={this.verifyCallback}\n        />\n\n        <h2>Google ReCaptcha with React </h2>\n\n        <code>\n          1. Add <strong>your site key</strong> in the ReCaptcha component. <br/>\n          2. Check <strong>console</strong> to see the token.\n        </code>\n      </div>\n    );\n  };\n};\n\nexport default ExampleComponent;\n\n```\n\n#### Actions\n\nThe ReCaptcha block can be triggered without a callback in order to trigger an action. \n\nSee https://developers.google.com/recaptcha/docs/v3#Actions for more Information.\n\n```\n<ReCaptcha\n    sitekey=\"your_site_key\"\n    action='action_name'\n/>\n```","readmeFilename":"README.md"}