summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/u2f
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-12-21 07:24:33 +0000
committerAlfredo Sumaran <alfredo@gitlab.com>2016-12-21 07:24:33 +0000
commit528c3e2b8d2d65257e489601220f34b918b80e17 (patch)
tree0b7b64f2542d166c19b12415621087d5635c2433 /app/assets/javascripts/u2f
parente4506330b411e8fa855c0f6a781ba66c2607c90e (diff)
parent26c69c5df8bf7800e16a2d12d207f2ae8779fb9e (diff)
downloadgitlab-ce-528c3e2b8d2d65257e489601220f34b918b80e17.tar.gz
Merge branch 'remove-u2f-error-logging' into 'master'
Display error code for U2F errors See merge request !7305
Diffstat (limited to 'app/assets/javascripts/u2f')
-rw-r--r--app/assets/javascripts/u2f/authenticate.js3
-rw-r--r--app/assets/javascripts/u2f/error.js1
-rw-r--r--app/assets/javascripts/u2f/register.js3
3 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/javascripts/u2f/authenticate.js b/app/assets/javascripts/u2f/authenticate.js
index d2aa3c7a841..e407b856e10 100644
--- a/app/assets/javascripts/u2f/authenticate.js
+++ b/app/assets/javascripts/u2f/authenticate.js
@@ -89,7 +89,8 @@
U2FAuthenticate.prototype.renderError = function(error) {
this.renderTemplate('error', {
- error_message: error.message()
+ error_message: error.message(),
+ error_code: error.errorCode
});
return this.container.find('#js-u2f-try-again').on('click', this.renderSetup);
};
diff --git a/app/assets/javascripts/u2f/error.js b/app/assets/javascripts/u2f/error.js
index 69f98c9c0ad..bb9942a3aa0 100644
--- a/app/assets/javascripts/u2f/error.js
+++ b/app/assets/javascripts/u2f/error.js
@@ -9,7 +9,6 @@
this.errorCode = errorCode;
this.message = bind(this.message, this);
this.httpsDisabled = window.location.protocol !== 'https:';
- console.error("U2F Error Code: " + this.errorCode);
}
U2FError.prototype.message = function() {
diff --git a/app/assets/javascripts/u2f/register.js b/app/assets/javascripts/u2f/register.js
index 4f5d68f546b..050c9bfc02e 100644
--- a/app/assets/javascripts/u2f/register.js
+++ b/app/assets/javascripts/u2f/register.js
@@ -76,7 +76,8 @@
U2FRegister.prototype.renderError = function(error) {
this.renderTemplate('error', {
- error_message: error.message()
+ error_message: error.message(),
+ error_code: error.errorCode
});
return this.container.find('#js-u2f-try-again').on('click', this.renderSetup);
};