feat: remove support for Non trace verification for Alibaba cloud captcha verification (#3881)

This commit is contained in:
DacongDA
2025-06-13 00:36:29 +08:00
committed by GitHub
parent 8cc22dec91
commit 12cc0f429e

View File

@ -13,8 +13,6 @@
// limitations under the License. // limitations under the License.
import React, {useEffect} from "react"; import React, {useEffect} from "react";
import {Button} from "antd";
import i18next from "i18next";
export const CaptchaWidget = (props) => { export const CaptchaWidget = (props) => {
const {captchaType, subType, siteKey, clientSecret, clientId2, clientSecret2, onChange} = props; const {captchaType, subType, siteKey, clientSecret, clientId2, clientSecret2, onChange} = props;
@ -103,7 +101,6 @@ export const CaptchaWidget = (props) => {
SceneId: clientId2, SceneId: clientId2,
mode: "embed", mode: "embed",
element: "#captcha", element: "#captcha",
button: "#captcha-button",
captchaVerifyCallback: (data) => { captchaVerifyCallback: (data) => {
onChange(data.toString()); onChange(data.toString());
}, },
@ -114,7 +111,6 @@ export const CaptchaWidget = (props) => {
language: "cn", language: "cn",
immediate: true, immediate: true,
}); });
} }
clearInterval(AWSCTimer); clearInterval(AWSCTimer);
} }
@ -167,9 +163,5 @@ export const CaptchaWidget = (props) => {
} }
}, [captchaType, subType, siteKey, clientSecret, clientId2, clientSecret2]); }, [captchaType, subType, siteKey, clientSecret, clientId2, clientSecret2]);
return <div id="captcha"> return <div id="captcha" />;
{
captchaType === "Aliyun Captcha" && window.initAliyunCaptcha ? <Button id="captcha-button">{i18next.t("general:Verifications")}</Button> : null
}
</div>;
}; };