mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
feat: Revert "feat: support reCAPTCHA v3 captcha provider" (#3135)
This reverts commit a0d6f2125e
.
This commit is contained in:
@ -27,7 +27,7 @@ export const CaptchaWidget = (props) => {
|
||||
|
||||
useEffect(() => {
|
||||
switch (captchaType) {
|
||||
case "reCAPTCHA v2": {
|
||||
case "reCAPTCHA": {
|
||||
const reTimer = setInterval(() => {
|
||||
if (!window.grecaptcha) {
|
||||
loadScript("https://recaptcha.net/recaptcha/api.js");
|
||||
@ -42,20 +42,6 @@ export const CaptchaWidget = (props) => {
|
||||
}, 300);
|
||||
break;
|
||||
}
|
||||
case "reCAPTCHA v3": {
|
||||
const reTimer = setInterval(() => {
|
||||
if (!window.grecaptcha) {
|
||||
loadScript(`https://recaptcha.net/recaptcha/api.js?render=${siteKey}`);
|
||||
}
|
||||
if (window.grecaptcha && window.grecaptcha.execute) {
|
||||
window.grecaptcha.execute(siteKey, {action: "submit"}).then(function(token) {
|
||||
onChange(token);
|
||||
});
|
||||
clearInterval(reTimer);
|
||||
}
|
||||
}, 300);
|
||||
break;
|
||||
}
|
||||
case "hCaptcha": {
|
||||
const hTimer = setInterval(() => {
|
||||
if (!window.hcaptcha) {
|
||||
|
Reference in New Issue
Block a user