diff --git a/app/assets/javascripts/discourse/controllers/login.js.es6 b/app/assets/javascripts/discourse/controllers/login.js.es6 index c90a1b07f77..fe57a856ec5 100644 --- a/app/assets/javascripts/discourse/controllers/login.js.es6 +++ b/app/assets/javascripts/discourse/controllers/login.js.es6 @@ -120,7 +120,8 @@ export default Controller.extend(ModalFunctionality, { data: { login: this.loginName, password: this.loginPassword, - second_factor_token: this.securityKeyCredential || this.secondFactorToken, + second_factor_token: + this.securityKeyCredential || this.secondFactorToken, second_factor_method: this.secondFactorMethod, timezone: moment.tz.guess() } diff --git a/app/assets/javascripts/discourse/controllers/password-reset.js.es6 b/app/assets/javascripts/discourse/controllers/password-reset.js.es6 index f423f0bff93..6e551a83014 100644 --- a/app/assets/javascripts/discourse/controllers/password-reset.js.es6 +++ b/app/assets/javascripts/discourse/controllers/password-reset.js.es6 @@ -52,7 +52,8 @@ export default Controller.extend(PasswordValidation, { type: "PUT", data: { password: this.accountPassword, - second_factor_token: this.securityKeyCredential || this.secondFactorToken, + second_factor_token: + this.securityKeyCredential || this.secondFactorToken, second_factor_method: this.secondFactorMethod } })