|
@@ -1155,7 +1155,7 @@ function initializeWebAuthn() {
|
|
|
const loginButton = document.getElementById("webauthn-login");
|
|
const loginButton = document.getElementById("webauthn-login");
|
|
|
const usernameField = document.getElementById("form-username");
|
|
const usernameField = document.getElementById("form-username");
|
|
|
|
|
|
|
|
- if (loginButton && usernameField) {
|
|
|
|
|
|
|
+ if (loginButton) {
|
|
|
const abortController = new AbortController();
|
|
const abortController = new AbortController();
|
|
|
loginButton.disabled = false;
|
|
loginButton.disabled = false;
|
|
|
|
|
|
|
@@ -1164,7 +1164,9 @@ function initializeWebAuthn() {
|
|
|
webauthnHandler.login().catch(err => WebAuthnHandler.showErrorMessage(err));
|
|
webauthnHandler.login().catch(err => WebAuthnHandler.showErrorMessage(err));
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- webauthnHandler.conditionalLogin(abortController).catch(err => WebAuthnHandler.showErrorMessage(err));
|
|
|
|
|
|
|
+ if (usernameField) {
|
|
|
|
|
+ webauthnHandler.conditionalLogin(abortController).catch(err => WebAuthnHandler.showErrorMessage(err));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|