From 2bb27c6febdbacbd7bbe4356318a6b3fa6fd84db Mon Sep 17 00:00:00 2001 From: Jarrett Helton Date: Tue, 24 Aug 2021 16:05:03 -0400 Subject: rename default exports --- packages/browser/src/methods/startAuthentication.ts | 4 ++-- packages/browser/src/methods/startRegistration.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/browser/src/methods') diff --git a/packages/browser/src/methods/startAuthentication.ts b/packages/browser/src/methods/startAuthentication.ts index 1764ff1..1f431f5 100644 --- a/packages/browser/src/methods/startAuthentication.ts +++ b/packages/browser/src/methods/startAuthentication.ts @@ -15,7 +15,7 @@ import toPublicKeyCredentialDescriptor from '../helpers/toPublicKeyCredentialDes * * @param requestOptionsJSON Output from @simplewebauthn/server's generateAssertionOptions(...) */ -export default async function startAssertion( +export default async function startAuthentication( requestOptionsJSON: PublicKeyCredentialRequestOptionsJSON, ): Promise { if (!supportsWebauthn()) { @@ -40,7 +40,7 @@ export default async function startAssertion( const credential = (await navigator.credentials.get({ publicKey })) as AuthenticationCredential; if (!credential) { - throw new Error('Assertion was not completed'); + throw new Error('Authentication was not completed'); } const { id, rawId, response, type } = credential; diff --git a/packages/browser/src/methods/startRegistration.ts b/packages/browser/src/methods/startRegistration.ts index be97a1a..1bb5c34 100644 --- a/packages/browser/src/methods/startRegistration.ts +++ b/packages/browser/src/methods/startRegistration.ts @@ -37,7 +37,7 @@ export default async function startRegistration( const credential = (await navigator.credentials.create({ publicKey })) as RegistrationCredential; if (!credential) { - throw new Error('Attestation was not completed'); + throw new Error('Registration was not completed'); } const { id, rawId, response, type } = credential; -- cgit v1.2.3