mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-15 05:33:50 +08:00
feat: support stateless MFA setup (#3382)
This commit is contained in:
@ -3,11 +3,15 @@ import i18next from "i18next";
|
||||
import React, {useState} from "react";
|
||||
import * as MfaBackend from "../../backend/MfaBackend";
|
||||
|
||||
export function MfaEnableForm({user, mfaType, recoveryCodes, onSuccess, onFail}) {
|
||||
export function MfaEnableForm({user, mfaType, secret, recoveryCodes, dest, countryCode, onSuccess, onFail}) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const requestEnableMfa = () => {
|
||||
const data = {
|
||||
mfaType,
|
||||
secret,
|
||||
recoveryCodes,
|
||||
dest,
|
||||
countryCode,
|
||||
...user,
|
||||
};
|
||||
setLoading(true);
|
||||
|
Reference in New Issue
Block a user