jwtbutler 1.9.7 → 1.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -71,7 +71,8 @@ const api = new jwtbutler({
71
71
  captcha: {
72
72
  provider: 'hcaptcha',
73
73
  sitekey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
74
- theme: 'light'
74
+ theme: 'light',
75
+ language: 'en'
75
76
  }
76
77
  });
77
78
  ```
@@ -491,10 +491,14 @@ class jwtbutler {
491
491
  resolve();
492
492
  return;
493
493
  }
494
- captcha.setAttribute('data-widget-id', window.hcaptcha.render(captcha, {
494
+ let options = {
495
495
  sitekey: this.config.captcha.sitekey,
496
496
  theme: this.config.captcha.theme || 'light'
497
- }));
497
+ };
498
+ if ('language' in this.config.captcha && this.config.captcha.language !== '') {
499
+ options.hl = this.config.captcha.language;
500
+ }
501
+ captcha.setAttribute('data-widget-id', window.hcaptcha.render(captcha, options));
498
502
  resolve();
499
503
  }).catch(error => {
500
504
  reject(error);
package/package.json CHANGED
@@ -81,7 +81,7 @@
81
81
  "jest-environment-node": "30.4.1"
82
82
  },
83
83
  "name": "jwtbutler",
84
- "version": "1.9.7",
84
+ "version": "1.9.8",
85
85
  "description": "",
86
86
  "main": "_js/_build/script.js",
87
87
  "files": [