diff --git a/www/LoginView.js b/www/LoginView.js index 1c7a977c..6dd09646 100644 --- a/www/LoginView.js +++ b/www/LoginView.js @@ -383,6 +383,7 @@ Ext.define('PBS.login.TfaWindow', { let view = me.getView(); me.lookup('webAuthnWaiting').setVisible(true); + me.lookup('webAuthnError').setVisible(false); let challenge = view.challenge.webauthn; @@ -409,6 +410,10 @@ Ext.define('PBS.login.TfaWindow', { // checking for error.code === DOMException.ABORT_ERR only works in firefox -.- this.getViewModel().set('canConfirm', true); // FIXME: better handling, show some message, ...? + me.lookup('webAuthnError').setData({ + error: Ext.htmlEncode(error.toString()), + }); + me.lookup('webAuthnError').setVisible(true); return; } finally { let waitingMessage = me.lookup('webAuthnWaiting'); @@ -505,6 +510,15 @@ Ext.define('PBS.login.TfaWindow', { reference: 'webAuthnWaiting', hidden: true, }, + { + xtype: 'box', + data: { + error: '', + }, + tpl: ' {error}', + reference: 'webAuthnError', + hidden: true, + }, ], }, {