Skip to content

Commit

Permalink
fix: captcha [WTEL-4251]
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed Mar 12, 2024
1 parent 4490eb9 commit 47c3077
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/css/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// https://developers.google.com/recaptcha/docs/faq#id-like-to-hide-the-recaptcha-badge.-what-is-allowed
.grecaptcha-badge {
visibility: hidden;
//visibility: hidden;
}

.wt-omni-widget--reset-styles,
Expand Down
12 changes: 8 additions & 4 deletions src/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,14 @@ export default class WtOmniWidget {
config,
}) {
await this.setConfig(config);
await initializeReCAPTCHA({
sitekey: config.reCAPTCHA.sitekey,
verifyUrl: config.reCAPTCHA.verifyUrl,
});

if (config.captcha) {
await initializeReCAPTCHA({
sitekey: config.captcha.sitekey,
verifyUrl: config.captcha.verifyUrl,
});
}

Instance.$mount(selector);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default new WtOmniWidget('#wt-omni-widget', {
url: 'wss://dev.webitel.com/sip',
id: 'dania-webchat',
},
reCAPTCHA: {
captcha: {
sitekey: '6LdTJJUpAAAAAFlzlOqs3mtaPhEnr0MOgBlc3W4N',
verifyUrl: 'https://dev.webitel.com/chat/dania-webchat/captcha',
},
Expand Down

0 comments on commit 47c3077

Please sign in to comment.