Recaptcha v3操作作为参数

时间:2019-03-07 15:30:54

标签: vue.js recaptcha recaptcha-v3

我将vue-recaptcha与recaptcha v3一起使用。 我也想找到一种发送动作的方法。

Google手册说,该操作应在execute函数中发送:

grecaptcha.ready(function() {
      grecaptcha.execute('reCAPTCHA_site_key', {action: 'homepage'}).then(function(token) {
         ...
      });
  });

但是在vue-recaptcha代码内部执行仅由窗口小部件ID调用:

execute: function execute(widgetId) {
        if (typeof widgetId === 'undefined') {
          return;
        }

        this.assertLoaded();
        this.wait().then(function () {
          return window.grecaptcha.execute(widgetId);
        });
      },

是否可以在html中指定recaptcha操作?

或者还有其他方法可以破解vue-recaptcha js代码以包含操作吗?

0 个答案:

没有答案