From e194138a41b8b0e63ddb087cf6138ca92f4d05d2 Mon Sep 17 00:00:00 2001 From: Andrew Min Date: Thu, 12 Oct 2023 12:17:23 -0400 Subject: [PATCH] remove overly-granular check --- packages/http/src/webauthn.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/http/src/webauthn.ts b/packages/http/src/webauthn.ts index cb91614d5..072c83483 100644 --- a/packages/http/src/webauthn.ts +++ b/packages/http/src/webauthn.ts @@ -147,16 +147,9 @@ export async function getWebAuthnAttestation( return toInternalAttestation(res.toJSON()); } -// For additional details see https://web.dev/articles/passkey-form-autofill#feature-detection, https://github.com/w3c/webauthn/wiki/Explainer:-WebAuthn-Conditional-UI +// `hasWebAuthnSupport` checks for barebones webauthn support. +// For additional details and granular settings, see: +// https://web.dev/articles/passkey-form-autofill#feature-detection, https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential async function hasWebAuthnSupport(): Promise { - if ( - window.PublicKeyCredential && - PublicKeyCredential.isConditionalMediationAvailable - ) { - const isCMA = await PublicKeyCredential.isConditionalMediationAvailable(); - - return isCMA; - } - - return false; + return !!window.PublicKeyCredential; }