mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
E2e tests for mfa. Fix a bug that made mfa impossible to disable
This commit is contained in:
@@ -38,9 +38,12 @@ export default class MfaDisable extends React.Component<
|
||||
onSubmit = (form: FormModel) => {
|
||||
return this.props
|
||||
.onSubmit(form, () => {
|
||||
const { totp } = form.serialize() as { totp: string };
|
||||
const { totp, password } = form.serialize() as {
|
||||
totp: string;
|
||||
password?: string;
|
||||
};
|
||||
|
||||
return disableMFA(this.context.userId, totp);
|
||||
return disableMFA(this.context.userId, totp, password);
|
||||
})
|
||||
.then(() => this.props.onComplete())
|
||||
.catch(resp => {
|
||||
|
||||
Reference in New Issue
Block a user