FIX: allow change password with TOTP

FIX: allow change password with TOTP

diff --git a/app/assets/javascripts/discourse/controllers/password-reset.js.es6 b/app/assets/javascripts/discourse/controllers/password-reset.js.es6
index ae3c5949a5..4194d67f16 100644
--- a/app/assets/javascripts/discourse/controllers/password-reset.js.es6
+++ b/app/assets/javascripts/discourse/controllers/password-reset.js.es6
@@ -16,9 +16,12 @@ export default Ember.Controller.extend(PasswordValidation, {
     "model.second_factor_required",
     "model.security_key_required"
   ),
-  secondFactorMethod: Ember.computed.alias("model.security_key_required")
-    ? SECOND_FACTOR_METHODS.SECURITY_KEY
-    : SECOND_FACTOR_METHODS.TOTP,
+  @computed("model.security_key_required")
+  secondFactorMethod(security_key_required) {
+    return security_key_required
+      ? SECOND_FACTOR_METHODS.SECURITY_KEY
+      : SECOND_FACTOR_METHODS.TOTP;
+  },
   passwordRequired: true,
   errorMessage: null,
   successMessage: null,

GitHub sha: 2b74dc58

1 Like

This commit has been mentioned on Discourse Meta. There might be relevant details there: