mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
feat: remove support for Non trace verification for Alibaba cloud captcha verification (#3881)
This commit is contained in:
@ -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>;
|
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user