1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-04 10:24:42 +02:00

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

This commit is contained in:
andryyy 2020-11-16 08:55:45 +01:00
parent 9dec340434
commit 21a75c1fd1

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