summaryrefslogtreecommitdiffhomepage
path: root/packages/browser/src/helpers
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2021-08-31 20:36:27 -0700
committerMatthew Miller <matthew@millerti.me>2021-08-31 20:36:27 -0700
commit660703c36df56972babb7d99a2674bd3e966a79d (patch)
tree7bce59e368a15c8815f873008cab90cb91fefd66 /packages/browser/src/helpers
parent5758fe2de619cfda2952abb16e134b7c25c1396b (diff)
Make sure WebAuthn is available before isUVPAA
Diffstat (limited to 'packages/browser/src/helpers')
-rw-r--r--packages/browser/src/helpers/platformAuthenticatorIsAvailable.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/browser/src/helpers/platformAuthenticatorIsAvailable.ts b/packages/browser/src/helpers/platformAuthenticatorIsAvailable.ts
index 10d84e3..af9cbcc 100644
--- a/packages/browser/src/helpers/platformAuthenticatorIsAvailable.ts
+++ b/packages/browser/src/helpers/platformAuthenticatorIsAvailable.ts
@@ -1,3 +1,5 @@
+import { browserSupportsWebauthn } from './browserSupportsWebauthn';
+
/**
* Determine whether the browser can communicate with a built-in authenticator, like
* Touch ID, Android fingerprint scanner, or Windows Hello.
@@ -5,5 +7,9 @@
* This method will _not_ be able to tell you the name of the platform authenticator.
*/
export async function platformAuthenticatorIsAvailable(): Promise<boolean> {
+ if (!browserSupportsWebauthn()) {
+ return false;
+ }
+
return PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable();
}