@simplewebauthn/browser 11.0.0 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -24
- package/dist/bundle/index.es5.umd.min.js +2 -2
- package/dist/bundle/index.umd.min.js +2 -2
- package/esm/helpers/base64URLStringToBuffer.d.ts +9 -0
- package/esm/helpers/base64URLStringToBuffer.d.ts.map +1 -0
- package/esm/helpers/base64URLStringToBuffer.js +29 -0
- package/esm/helpers/browserSupportsWebAuthn.d.ts +8 -0
- package/esm/helpers/browserSupportsWebAuthn.d.ts.map +1 -0
- package/esm/helpers/browserSupportsWebAuthn.js +11 -0
- package/esm/helpers/browserSupportsWebAuthnAutofill.d.ts +9 -0
- package/esm/helpers/browserSupportsWebAuthnAutofill.d.ts.map +1 -0
- package/esm/helpers/browserSupportsWebAuthnAutofill.js +26 -0
- package/esm/helpers/bufferToBase64URLString.d.ts +8 -0
- package/esm/helpers/bufferToBase64URLString.d.ts.map +1 -0
- package/esm/helpers/bufferToBase64URLString.js +15 -0
- package/esm/helpers/identifyAuthenticationError.d.ts +9 -0
- package/esm/helpers/identifyAuthenticationError.d.ts.map +1 -0
- package/esm/helpers/identifyAuthenticationError.js +61 -0
- package/esm/helpers/identifyRegistrationError.d.ts +9 -0
- package/esm/helpers/identifyRegistrationError.d.ts.map +1 -0
- package/esm/helpers/identifyRegistrationError.js +126 -0
- package/esm/helpers/isValidDomain.d.ts +10 -0
- package/esm/helpers/isValidDomain.d.ts.map +1 -0
- package/esm/helpers/isValidDomain.js +14 -0
- package/esm/helpers/platformAuthenticatorIsAvailable.d.ts +8 -0
- package/esm/helpers/platformAuthenticatorIsAvailable.d.ts.map +1 -0
- package/esm/helpers/platformAuthenticatorIsAvailable.js +13 -0
- package/{dist/types → esm}/helpers/toAuthenticatorAttachment.d.ts +4 -0
- package/esm/helpers/toAuthenticatorAttachment.d.ts.map +1 -0
- package/esm/helpers/toAuthenticatorAttachment.js +13 -0
- package/esm/helpers/toPublicKeyCredentialDescriptor.d.ts +3 -0
- package/esm/helpers/toPublicKeyCredentialDescriptor.d.ts.map +1 -0
- package/esm/helpers/toPublicKeyCredentialDescriptor.js +14 -0
- package/esm/helpers/webAuthnAbortService.d.ts +14 -0
- package/esm/helpers/webAuthnAbortService.d.ts.map +1 -0
- package/esm/helpers/webAuthnAbortService.js +45 -0
- package/{dist/types → esm}/helpers/webAuthnError.d.ts +18 -0
- package/esm/helpers/webAuthnError.d.ts.map +1 -0
- package/esm/helpers/webAuthnError.js +31 -0
- package/esm/index.d.ts +16 -0
- package/esm/index.d.ts.map +1 -0
- package/{dist/types/index.d.ts → esm/index.js} +13 -10
- package/esm/methods/startAuthentication.d.ts +15 -0
- package/esm/methods/startAuthentication.d.ts.map +1 -0
- package/esm/methods/startAuthentication.js +89 -0
- package/esm/methods/startRegistration.d.ts +13 -0
- package/esm/methods/startRegistration.d.ts.map +1 -0
- package/esm/methods/startRegistration.js +115 -0
- package/esm/package.json +3 -0
- package/package.json +25 -29
- package/script/helpers/base64URLStringToBuffer.d.ts +9 -0
- package/script/helpers/base64URLStringToBuffer.d.ts.map +1 -0
- package/script/helpers/base64URLStringToBuffer.js +32 -0
- package/script/helpers/browserSupportsWebAuthn.d.ts +8 -0
- package/script/helpers/browserSupportsWebAuthn.d.ts.map +1 -0
- package/script/helpers/browserSupportsWebAuthn.js +15 -0
- package/script/helpers/browserSupportsWebAuthnAutofill.d.ts +9 -0
- package/script/helpers/browserSupportsWebAuthnAutofill.d.ts.map +1 -0
- package/script/helpers/browserSupportsWebAuthnAutofill.js +30 -0
- package/script/helpers/bufferToBase64URLString.d.ts +8 -0
- package/script/helpers/bufferToBase64URLString.d.ts.map +1 -0
- package/script/helpers/bufferToBase64URLString.js +18 -0
- package/script/helpers/identifyAuthenticationError.d.ts +9 -0
- package/script/helpers/identifyAuthenticationError.d.ts.map +1 -0
- package/script/helpers/identifyAuthenticationError.js +64 -0
- package/script/helpers/identifyRegistrationError.d.ts +9 -0
- package/script/helpers/identifyRegistrationError.d.ts.map +1 -0
- package/script/helpers/identifyRegistrationError.js +129 -0
- package/script/helpers/isValidDomain.d.ts +10 -0
- package/script/helpers/isValidDomain.d.ts.map +1 -0
- package/script/helpers/isValidDomain.js +17 -0
- package/script/helpers/platformAuthenticatorIsAvailable.d.ts +8 -0
- package/script/helpers/platformAuthenticatorIsAvailable.d.ts.map +1 -0
- package/script/helpers/platformAuthenticatorIsAvailable.js +16 -0
- package/script/helpers/toAuthenticatorAttachment.d.ts +6 -0
- package/script/helpers/toAuthenticatorAttachment.d.ts.map +1 -0
- package/script/helpers/toAuthenticatorAttachment.js +16 -0
- package/script/helpers/toPublicKeyCredentialDescriptor.d.ts +3 -0
- package/script/helpers/toPublicKeyCredentialDescriptor.d.ts.map +1 -0
- package/script/helpers/toPublicKeyCredentialDescriptor.js +17 -0
- package/script/helpers/webAuthnAbortService.d.ts +14 -0
- package/script/helpers/webAuthnAbortService.d.ts.map +1 -0
- package/script/helpers/webAuthnAbortService.js +48 -0
- package/script/helpers/webAuthnError.d.ts +28 -0
- package/script/helpers/webAuthnError.d.ts.map +1 -0
- package/script/helpers/webAuthnError.js +35 -0
- package/script/index.d.ts +16 -0
- package/script/index.d.ts.map +1 -0
- package/script/index.js +25 -0
- package/script/methods/startAuthentication.d.ts +15 -0
- package/script/methods/startAuthentication.d.ts.map +1 -0
- package/script/methods/startAuthentication.js +92 -0
- package/script/methods/startRegistration.d.ts +13 -0
- package/script/methods/startRegistration.d.ts.map +1 -0
- package/script/methods/startRegistration.js +118 -0
- package/script/package.json +3 -0
- package/dist/bundle/index.js +0 -398
- package/dist/types/helpers/base64URLStringToBuffer.d.ts +0 -1
- package/dist/types/helpers/browserSupportsWebAuthn.d.ts +0 -1
- package/dist/types/helpers/browserSupportsWebAuthnAutofill.d.ts +0 -1
- package/dist/types/helpers/bufferToBase64URLString.d.ts +0 -1
- package/dist/types/helpers/identifyAuthenticationError.d.ts +0 -5
- package/dist/types/helpers/identifyRegistrationError.d.ts +0 -5
- package/dist/types/helpers/isValidDomain.d.ts +0 -1
- package/dist/types/helpers/platformAuthenticatorIsAvailable.d.ts +0 -1
- package/dist/types/helpers/toPublicKeyCredentialDescriptor.d.ts +0 -2
- package/dist/types/helpers/webAuthnAbortService.d.ts +0 -7
- package/dist/types/methods/startAuthentication.d.ts +0 -7
- package/dist/types/methods/startRegistration.d.ts +0 -6
- package/jest-environment.js +0 -29
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isValidDomain(hostname: string): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function platformAuthenticatorIsAvailable(): Promise<boolean>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AuthenticationResponseJSON, PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
|
|
2
|
-
export type StartAuthenticationOpts = {
|
|
3
|
-
optionsJSON: PublicKeyCredentialRequestOptionsJSON;
|
|
4
|
-
useBrowserAutofill?: boolean;
|
|
5
|
-
verifyBrowserAutofillInput?: boolean;
|
|
6
|
-
};
|
|
7
|
-
export declare function startAuthentication(options: StartAuthenticationOpts): Promise<AuthenticationResponseJSON>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PublicKeyCredentialCreationOptionsJSON, RegistrationResponseJSON } from '@simplewebauthn/types';
|
|
2
|
-
export type StartRegistrationOpts = {
|
|
3
|
-
optionsJSON: PublicKeyCredentialCreationOptionsJSON;
|
|
4
|
-
useAutoRegister?: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare function startRegistration(options: StartRegistrationOpts): Promise<RegistrationResponseJSON>;
|
package/jest-environment.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { TestEnvironment } from 'jest-environment-jsdom';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Set up a custom JSDOM-based test environment for Jest so we can add things JSDOM doesn't support
|
|
5
|
-
*/
|
|
6
|
-
class CustomTestEnvironment extends TestEnvironment {
|
|
7
|
-
async setup() {
|
|
8
|
-
await super.setup();
|
|
9
|
-
/**
|
|
10
|
-
* JSDOM doesn't implement TextEncoder so we need to fake it with Node's
|
|
11
|
-
*
|
|
12
|
-
* Solved thanks to https://stackoverflow.com/a/57713960/2133271
|
|
13
|
-
*/
|
|
14
|
-
if (typeof this.global.TextEncoder === 'undefined') {
|
|
15
|
-
const { TextEncoder } = await import('util');
|
|
16
|
-
this.global.TextEncoder = TextEncoder;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Add support for TextDecoder to JSDOM
|
|
21
|
-
*/
|
|
22
|
-
if (typeof this.global.TextDecoder === 'undefined') {
|
|
23
|
-
const { TextDecoder } = await import('util');
|
|
24
|
-
this.global.TextDecoder = TextDecoder;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default CustomTestEnvironment;
|