[Web] FIDO2: Print thrown error in verification failure, if any

master
andryyy 2020-11-16 08:55:45 +01:00
parent 9dec340434
commit 21a75c1fd1
1 changed files with 5 additions and 1 deletions

View File

@ -167,7 +167,11 @@ $(document).ready(function() {
throw new Error();
}
}).catch(function(err) {
mailcow_alert_box(lang_fido2.fido2_validation_failed, "danger");
if (typeof err.message === 'undefined') {
mailcow_alert_box(lang_fido2.fido2_validation_failed, "danger");
} else {
mailcow_alert_box(lang_fido2.fido2_validation_failed + ":<br><i>" + err.message + "</i>", "danger");
}
});
});
// Set TFA/FIDO2