diff options
Diffstat (limited to 'packages/browser/src')
-rw-r--r-- | packages/browser/src/helpers/browserSupportsWebAuthnAutofill.ts (renamed from packages/browser/src/helpers/browserSupportsConditionalMediation.ts) | 4 | ||||
-rw-r--r-- | packages/browser/src/index.ts | 2 | ||||
-rw-r--r-- | packages/browser/src/methods/startAuthentication.ts | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/packages/browser/src/helpers/browserSupportsConditionalMediation.ts b/packages/browser/src/helpers/browserSupportsWebAuthnAutofill.ts index e3fbcea..d0a5ca6 100644 --- a/packages/browser/src/helpers/browserSupportsConditionalMediation.ts +++ b/packages/browser/src/helpers/browserSupportsWebAuthnAutofill.ts @@ -1,4 +1,8 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ +/** + * Determine if the browser supports conditional UI, so that WebAuthn credentials can + * be shown to the user in the browser's typical password autofill popup. + */ export async function browserSupportsWebAuthnAutofill(): Promise<boolean> { // Just for Chrome Canary right now; the PublicKeyCredential logic below is the real API // @ts-ignore diff --git a/packages/browser/src/index.ts b/packages/browser/src/index.ts index dc085d0..2b327ee 100644 --- a/packages/browser/src/index.ts +++ b/packages/browser/src/index.ts @@ -6,10 +6,12 @@ import { startRegistration } from './methods/startRegistration'; import { startAuthentication } from './methods/startAuthentication'; import { browserSupportsWebauthn } from './helpers/browserSupportsWebauthn'; import { platformAuthenticatorIsAvailable } from './helpers/platformAuthenticatorIsAvailable'; +import { browserSupportsWebAuthnAutofill } from './helpers/browserSupportsWebAuthnAutofill'; export { startRegistration, startAuthentication, browserSupportsWebauthn, platformAuthenticatorIsAvailable, + browserSupportsWebAuthnAutofill, }; diff --git a/packages/browser/src/methods/startAuthentication.ts b/packages/browser/src/methods/startAuthentication.ts index fd6f9a2..0bcd097 100644 --- a/packages/browser/src/methods/startAuthentication.ts +++ b/packages/browser/src/methods/startAuthentication.ts @@ -8,7 +8,7 @@ import bufferToBase64URLString from '../helpers/bufferToBase64URLString'; import base64URLStringToBuffer from '../helpers/base64URLStringToBuffer'; import bufferToUTF8String from '../helpers/bufferToUTF8String'; import { browserSupportsWebauthn } from '../helpers/browserSupportsWebauthn'; -import { browserSupportsWebAuthnAutofill } from '../helpers/browserSupportsConditionalMediation'; +import { browserSupportsWebAuthnAutofill } from '../helpers/browserSupportsWebAuthnAutofill'; import toPublicKeyCredentialDescriptor from '../helpers/toPublicKeyCredentialDescriptor'; import { identifyAuthenticationError } from '../helpers/identifyAuthenticationError'; import { webauthnAbortService } from '../helpers/webAuthnAbortService'; |