mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-05 16:50:29 +08:00
feat: fix Email and SMS check failures when enabling or verifying MFA (#4122)
This commit is contained in:
@@ -12,13 +12,6 @@ export const MfaVerifySmsForm = ({mfaProps, application, onFinish, method, user}
|
||||
const [dest, setDest] = React.useState("");
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const handleFinish = (values) => {
|
||||
onFinish({
|
||||
passcode: values.passcode,
|
||||
enableMfaRemember: values.enableMfaRemember,
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (method === mfaAuth) {
|
||||
setDest(mfaProps.secret);
|
||||
@@ -58,7 +51,7 @@ export const MfaVerifySmsForm = ({mfaProps, application, onFinish, method, user}
|
||||
<Form
|
||||
form={form}
|
||||
style={{width: "300px"}}
|
||||
onFinish={handleFinish}
|
||||
onFinish={onFinish}
|
||||
initialValues={{
|
||||
countryCode: mfaProps.countryCode,
|
||||
enableMfaRemember: false,
|
||||
|
@@ -8,13 +8,6 @@ import * as Setting from "../../Setting";
|
||||
export const MfaVerifyTotpForm = ({mfaProps, onFinish}) => {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const handleFinish = (values) => {
|
||||
onFinish({
|
||||
passcode: values.passcode,
|
||||
enableMfaRemember: values.enableMfaRemember,
|
||||
});
|
||||
};
|
||||
|
||||
const renderSecret = () => {
|
||||
if (!mfaProps.secret) {
|
||||
return null;
|
||||
@@ -47,7 +40,7 @@ export const MfaVerifyTotpForm = ({mfaProps, onFinish}) => {
|
||||
<Form
|
||||
form={form}
|
||||
style={{width: "300px"}}
|
||||
onFinish={handleFinish}
|
||||
onFinish={onFinish}
|
||||
initialValues={{
|
||||
enableMfaRemember: false,
|
||||
}}
|
||||
|
Reference in New Issue
Block a user