Skip to content

Commit

Permalink
fix: run captchify without captcha [WTEL-4318]
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed Mar 13, 2024
1 parent 383f1b7 commit 21ee24d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/reCAPTCHA-verification/scripts/reCAPTCHify.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import store from '../../../app/store';
import reCAPTCHA from '../api/reCAPTCHA';

const reCAPTCHify = async (callback, {
action = 'default_action',
} = {}) => {
try {
if (!store.state.config.captcha) return callback();

const token = await reCAPTCHA.executeReCAPTCHA({ action });
const response = await reCAPTCHA.verifyReCAPTCHA(token);
return callback(response);
Expand Down

0 comments on commit 21ee24d

Please sign in to comment.