From 896eb8565d4f57d6c68c289e36724f9c7d740379 Mon Sep 17 00:00:00 2001 From: Simeon Keske Date: Wed, 26 Aug 2020 23:37:03 +0200 Subject: [PATCH] patchh webauthn authenticate --- login/webauthn-authenticate.ftl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/login/webauthn-authenticate.ftl b/login/webauthn-authenticate.ftl index e3adcc2..886342a 100644 --- a/login/webauthn-authenticate.ftl +++ b/login/webauthn-authenticate.ftl @@ -76,6 +76,12 @@ if (userVerification !== 'not specified') publicKey.userVerification = userVerification; + if (window.PublicKeyCredential === undefined || typeof window.PublicKeyCredential !== "function") { + $("#error").val("WebAuthn is not supported by this Browser"); + $("#webauth").submit(); + return; + } + navigator.credentials.get({publicKey}) .then((result) => { window.result = result;