From cc3d7e72314ac3fdd4b1de55afb9bb194070e549 Mon Sep 17 00:00:00 2001 From: "Matt H." Date: Mon, 2 Dec 2024 11:27:05 -0500 Subject: [PATCH] Avoid waiting for a 2nd on-load event before calling `verifyWebAuthn()` --- .../material/themes/material/mfa/prompt-for-mfa-webauthn.twig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/material/themes/material/mfa/prompt-for-mfa-webauthn.twig b/modules/material/themes/material/mfa/prompt-for-mfa-webauthn.twig index 5d2a3ca..650d062 100644 --- a/modules/material/themes/material/mfa/prompt-for-mfa-webauthn.twig +++ b/modules/material/themes/material/mfa/prompt-for-mfa-webauthn.twig @@ -65,7 +65,8 @@ } document.getElementById('showBtn').addEventListener('click', verifyWebAuthn); - document.querySelector('body').addEventListener('load', verifyWebAuthn); + + verifyWebAuthn(); });