diff --git a/app/assets/javascripts/discourse/controllers/second-factor-add-security-key.js.es6 b/app/assets/javascripts/discourse/controllers/second-factor-add-security-key.js.es6 index 2cb03f968ff..14b0524b1c4 100644 --- a/app/assets/javascripts/discourse/controllers/second-factor-add-security-key.js.es6 +++ b/app/assets/javascripts/discourse/controllers/second-factor-add-security-key.js.es6 @@ -38,7 +38,7 @@ export default Controller.extend(ModalFunctionality, { id: response.rp_id, name: response.rp_name }, - supported_algoriths: response.supported_algoriths, + supported_algorithms: response.supported_algorithms, user_secure_id: response.user_secure_id, existing_active_credential_ids: response.existing_active_credential_ids @@ -71,7 +71,7 @@ export default Controller.extend(ModalFunctionality, { displayName: this.model.username_lower, name: this.model.username_lower }, - pubKeyCredParams: this.supported_algoriths.map(alg => { + pubKeyCredParams: this.supported_algorithms.map(alg => { return { type: "public-key", alg: alg }; }), excludeCredentials: this.existing_active_credential_ids.map( diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 6afac2bacb9..9af8c2aa7e7 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1197,7 +1197,7 @@ class UsersController < ApplicationController challenge: challenge_session.challenge, rp_id: challenge_session.rp_id, rp_name: challenge_session.rp_name, - supported_algoriths: ::Webauthn::SUPPORTED_ALGORITHMS, + supported_algorithms: ::Webauthn::SUPPORTED_ALGORITHMS, user_secure_id: current_user.create_or_fetch_secure_identifier, existing_active_credential_ids: current_user.second_factor_security_key_credential_ids ) diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rb index 05077074820..707c61d6ba6 100644 --- a/spec/requests/users_controller_spec.rb +++ b/spec/requests/users_controller_spec.rb @@ -3770,7 +3770,7 @@ describe UsersController do expect(response_parsed["user_secure_id"]).to eq( user.reload.create_or_fetch_secure_identifier ) - expect(response_parsed["supported_algoriths"]).to eq( + expect(response_parsed["supported_algorithms"]).to eq( ::Webauthn::SUPPORTED_ALGORITHMS ) end diff --git a/test/javascripts/acceptance/preferences-test.js.es6 b/test/javascripts/acceptance/preferences-test.js.es6 index c651c678022..46b11864ede 100644 --- a/test/javascripts/acceptance/preferences-test.js.es6 +++ b/test/javascripts/acceptance/preferences-test.js.es6 @@ -26,7 +26,7 @@ acceptance("User Preferences", { "a6d393d12654c130b2273e68ca25ca232d1d7f4c2464c2610fb8710a89d4", rp_id: "localhost", rp_name: "Discourse", - supported_algoriths: [-7, -257] + supported_algorithms: [-7, -257] }); });