E2e tests for mfa. Fix a bug that made mfa impossible to disable

This commit is contained in:
SleepWalker
2019-12-29 16:20:08 +02:00
parent 73d2baeb3a
commit f8670db315
7 changed files with 242 additions and 7 deletions

View File

@@ -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 => {