fix: fix state after mfa is enabled (#2050)

This commit is contained in:
Yaodong Yu
2023-07-08 22:35:31 +08:00
committed by GitHub
parent 68417a2d7a
commit a58df645bf
3 changed files with 4 additions and 7 deletions

View File

@ -190,7 +190,7 @@ class MfaSetupPage extends React.Component {
<MfaEnableForm user={this.getUser()} mfaType={this.state.mfaType} recoveryCodes={this.state.mfaProps.recoveryCodes}
onSuccess={() => {
Setting.showMessage("success", i18next.t("general:Enabled successfully"));
this.props.onfinish(true);
this.props.onfinish();
if (localStorage.getItem("mfaRedirectUrl") !== null) {
Setting.goToLink(localStorage.getItem("mfaRedirectUrl"));
localStorage.removeItem("mfaRedirectUrl");