diff options
author | Matthew Miller <matthew@millerti.me> | 2021-08-23 20:12:35 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2021-08-23 20:12:35 -0700 |
commit | 09c073098fc2ea506692de614d578c805b74705a (patch) | |
tree | 15b81fa6097dfa96d2ee2ff51161bd2453a1b06b /packages/browser/src | |
parent | 9a849c3d7eb6c82195ddfcd20f1ad4796a7873ec (diff) |
Add new platformAuthenticatorIsAvailable helper
Diffstat (limited to 'packages/browser/src')
-rw-r--r-- | packages/browser/src/helpers/platformAuthenticatorIsAvailable.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/browser/src/helpers/platformAuthenticatorIsAvailable.ts b/packages/browser/src/helpers/platformAuthenticatorIsAvailable.ts new file mode 100644 index 0000000..10d84e3 --- /dev/null +++ b/packages/browser/src/helpers/platformAuthenticatorIsAvailable.ts @@ -0,0 +1,9 @@ +/** + * Determine whether the browser can communicate with a built-in authenticator, like + * Touch ID, Android fingerprint scanner, or Windows Hello. + * + * This method will _not_ be able to tell you the name of the platform authenticator. + */ +export async function platformAuthenticatorIsAvailable(): Promise<boolean> { + return PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable(); +} |