Merge branch 'remove-u2f-error-logging' into 'master'
Display error code for U2F errors See merge request !7305
This commit is contained in:
commit
528c3e2b8d
6 changed files with 10 additions and 5 deletions
|
@ -89,7 +89,8 @@
|
||||||
|
|
||||||
U2FAuthenticate.prototype.renderError = function(error) {
|
U2FAuthenticate.prototype.renderError = function(error) {
|
||||||
this.renderTemplate('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);
|
return this.container.find('#js-u2f-try-again').on('click', this.renderSetup);
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
this.errorCode = errorCode;
|
this.errorCode = errorCode;
|
||||||
this.message = bind(this.message, this);
|
this.message = bind(this.message, this);
|
||||||
this.httpsDisabled = window.location.protocol !== 'https:';
|
this.httpsDisabled = window.location.protocol !== 'https:';
|
||||||
console.error("U2F Error Code: " + this.errorCode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
U2FError.prototype.message = function() {
|
U2FError.prototype.message = function() {
|
||||||
|
|
|
@ -76,7 +76,8 @@
|
||||||
|
|
||||||
U2FRegister.prototype.renderError = function(error) {
|
U2FRegister.prototype.renderError = function(error) {
|
||||||
this.renderTemplate('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);
|
return this.container.find('#js-u2f-try-again').on('click', this.renderSetup);
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
%script#js-authenticate-u2f-error{ type: "text/template" }
|
%script#js-authenticate-u2f-error{ type: "text/template" }
|
||||||
%div
|
%div
|
||||||
%p <%= error_message %>
|
%p <%= error_message %> (error code: <%= error_code %>)
|
||||||
%a.btn.btn-warning#js-u2f-try-again Try again?
|
%a.btn.btn-warning#js-u2f-try-again Try again?
|
||||||
|
|
||||||
%script#js-authenticate-u2f-authenticated{ type: "text/template" }
|
%script#js-authenticate-u2f-authenticated{ type: "text/template" }
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
%script#js-register-u2f-error{ type: "text/template" }
|
%script#js-register-u2f-error{ type: "text/template" }
|
||||||
%div
|
%div
|
||||||
%p
|
%p
|
||||||
%span <%= error_message %>
|
%span <%= error_message %> (error code: <%= error_code %>)
|
||||||
%a.btn.btn-warning#js-u2f-try-again Try again?
|
%a.btn.btn-warning#js-u2f-try-again Try again?
|
||||||
|
|
||||||
%script#js-register-u2f-registered{ type: "text/template" }
|
%script#js-register-u2f-registered{ type: "text/template" }
|
||||||
|
|
4
changelogs/unreleased/remove-u2f-error-logging.yml
Normal file
4
changelogs/unreleased/remove-u2f-error-logging.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: Display error code for U2F errors
|
||||||
|
merge_request: 7305
|
||||||
|
author: winniehell
|
Loading…
Reference in a new issue