Socket
Socket
Sign inDemoInstall

vue-recaptcha-v3

Package Overview
Dependencies
11
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.2.0

2

dist/IReCaptchaOptions.d.ts

@@ -0,3 +1,5 @@

import { IReCaptchaLoaderOptions } from 'recaptcha-v3/dist/ReCaptchaLoader';
export interface IReCaptchaOptions {
siteKey: string;
loaderOptions: IReCaptchaLoaderOptions;
}

6

dist/ReCaptchaVuePlugin.js

@@ -47,3 +47,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

}); };
plugin.initializeReCaptcha(options.siteKey).then(function (wrapper) {
plugin.initializeReCaptcha(options).then(function (wrapper) {
recaptchaLoaded = true;

@@ -59,7 +59,7 @@ Vue.prototype.$recaptcha = function (action) {

}
ReCaptchaVuePlugin.prototype.initializeReCaptcha = function (siteKey) {
ReCaptchaVuePlugin.prototype.initializeReCaptcha = function (options) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4, loadReCaptcha(siteKey)];
case 0: return [4, loadReCaptcha(options.siteKey, options.loaderOptions)];
case 1: return [2, _a.sent()];

@@ -66,0 +66,0 @@ }

{
"name": "vue-recaptcha-v3",
"version": "1.1.1",
"version": "1.2.0",
"keywords": [

@@ -32,3 +32,3 @@ "captcha",

"dependencies": {
"recaptcha-v3": "^1.0.2"
"recaptcha-v3": "1.2.0"
},

@@ -35,0 +35,0 @@ "devDependencies": {

@@ -27,3 +27,4 @@ # Vue reCAPTCHA-v3

vue.use(VueReCaptcha, { siteKey: '<site key>' })
// For more options see below
Vue.use(VueReCaptcha, { siteKey: '<site key>' })

@@ -40,3 +41,26 @@ new Vue({

})
```
## Options
This plugin offers optional options to configure the behavior of some parts.
Available options:
|Name|Description|Type|Default value
|----|-----------|----|-------------
|siteKey|The site key for your domain from Google.|*string*|*none*
|loaderOptions|Optional options for the [recaptcha-v3](https://github.com/AurityLab/recaptcha-v3) loader. The available options are described [here](https://github.com/AurityLab/recaptcha-v3/tree/v1.2.0#usage-1).|*object*|`null`
### Usage
To use the options just pass an object to the `Vue.use(...)` method. For example:
```javascript
import Vue from 'vue'
import { VueReCaptcha } from 'vue-recaptcha-v3'
Vue.use(VueReCaptcha, {
siteKey: '<site key>',
loaderOptions: {
useRecaptchaNet: true
}
})
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc