@dynamic-labs/webauthn 3.0.0-alpha.51 → 3.0.0-alpha.52
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/CHANGELOG.md +12 -0
- package/package.json +2 -2
- package/src/index.cjs +2 -2
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/lib/{verifyWebauthnCredential.cjs → authenticateWebauthnCredential.cjs} +3 -3
- package/src/lib/authenticateWebauthnCredential.d.ts +2 -0
- package/src/lib/{verifyWebauthnCredential.js → authenticateWebauthnCredential.js} +3 -3
- package/src/types.d.ts +2 -2
- package/src/lib/verifyWebauthnCredential.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
|
|
2
|
+
## [3.0.0-alpha.52](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.51...v3.0.0-alpha.52) (2024-08-28)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add support for custom keplr chains ([#6635](https://github.com/dynamic-labs/DynamicAuth/issues/6635)) ([f0aa2da](https://github.com/dynamic-labs/DynamicAuth/commit/f0aa2dac2a2b259d145ff52174da7cc6ef963182))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* better error handling on solana transaction decoding ([#6731](https://github.com/dynamic-labs/DynamicAuth/issues/6731)) ([a71af86](https://github.com/dynamic-labs/DynamicAuth/commit/a71af869395c9b99c04f0cac78a73e1b2b17bafe))
|
|
13
|
+
|
|
2
14
|
## [3.0.0-alpha.51](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.50...v3.0.0-alpha.51) (2024-08-23)
|
|
3
15
|
|
|
4
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/webauthn",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.52",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@simplewebauthn/browser": "9.0.1",
|
|
30
30
|
"@simplewebauthn/types": "9.0.1",
|
|
31
|
-
"@dynamic-labs/logger": "3.0.0-alpha.
|
|
31
|
+
"@dynamic-labs/logger": "3.0.0-alpha.52"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {}
|
|
34
34
|
}
|
package/src/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var WebauthnNotSupportedError = require('./lib/errors/WebauthnNotSupportedError.cjs');
|
|
7
7
|
var createWebauthnCredential = require('./lib/createWebauthnCredential.cjs');
|
|
8
|
-
var
|
|
8
|
+
var authenticateWebauthnCredential = require('./lib/authenticateWebauthnCredential.cjs');
|
|
9
9
|
var convertTransportEnumToTurnkeyEnum = require('./lib/adapters/convertTransportEnumToTurnkeyEnum.cjs');
|
|
10
10
|
var getWebAuthnAttestationTurnkeyAdapter = require('./lib/adapters/getWebAuthnAttestationTurnkeyAdapter.cjs');
|
|
11
11
|
|
|
@@ -13,6 +13,6 @@ var getWebAuthnAttestationTurnkeyAdapter = require('./lib/adapters/getWebAuthnAt
|
|
|
13
13
|
|
|
14
14
|
exports.WebauthnNotSupportedError = WebauthnNotSupportedError.WebauthnNotSupportedError;
|
|
15
15
|
exports.createWebauthnCredential = createWebauthnCredential.createWebauthnCredential;
|
|
16
|
-
exports.
|
|
16
|
+
exports.authenticateWebauthnCredential = authenticateWebauthnCredential.authenticateWebauthnCredential;
|
|
17
17
|
exports.convertTransportEnumToTurnkeyEnum = convertTransportEnumToTurnkeyEnum.convertTransportEnumToTurnkeyEnum;
|
|
18
18
|
exports.getWebAuthnAttestationTurnkeyAdapter = getWebAuthnAttestationTurnkeyAdapter.getWebAuthnAttestationTurnkeyAdapter;
|
package/src/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './lib/errors/WebauthnNotSupportedError';
|
|
2
2
|
export * from './lib/createWebauthnCredential';
|
|
3
|
-
export * from './lib/
|
|
3
|
+
export * from './lib/authenticateWebauthnCredential';
|
|
4
4
|
export * from './types';
|
|
5
5
|
export * from './lib/adapters/convertTransportEnumToTurnkeyEnum';
|
|
6
6
|
export * from './lib/adapters/getWebAuthnAttestationTurnkeyAdapter';
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
export { WebauthnNotSupportedError } from './lib/errors/WebauthnNotSupportedError.js';
|
|
3
3
|
export { createWebauthnCredential } from './lib/createWebauthnCredential.js';
|
|
4
|
-
export {
|
|
4
|
+
export { authenticateWebauthnCredential } from './lib/authenticateWebauthnCredential.js';
|
|
5
5
|
export { convertTransportEnumToTurnkeyEnum } from './lib/adapters/convertTransportEnumToTurnkeyEnum.js';
|
|
6
6
|
export { getWebAuthnAttestationTurnkeyAdapter } from './lib/adapters/getWebAuthnAttestationTurnkeyAdapter.js';
|
|
@@ -8,7 +8,7 @@ var browser = require('@simplewebauthn/browser');
|
|
|
8
8
|
var WebauthnNotSupportedError = require('./errors/WebauthnNotSupportedError.cjs');
|
|
9
9
|
var logger = require('./logger.cjs');
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const authenticateWebauthnCredential = (options) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
12
12
|
if (!browser.browserSupportsWebAuthn()) {
|
|
13
13
|
throw new WebauthnNotSupportedError.WebauthnNotSupportedError();
|
|
14
14
|
}
|
|
@@ -17,10 +17,10 @@ const verifyWebauthnCredential = (options) => _tslib.__awaiter(void 0, void 0, v
|
|
|
17
17
|
assertionResp = yield browser.startAuthentication(options);
|
|
18
18
|
}
|
|
19
19
|
catch (error) {
|
|
20
|
-
logger.logger.debug('Failed to
|
|
20
|
+
logger.logger.debug('Failed to authenticate webauthn credential', error);
|
|
21
21
|
throw error;
|
|
22
22
|
}
|
|
23
23
|
return assertionResp;
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
exports.
|
|
26
|
+
exports.authenticateWebauthnCredential = authenticateWebauthnCredential;
|
|
@@ -4,7 +4,7 @@ import { browserSupportsWebAuthn, startAuthentication } from '@simplewebauthn/br
|
|
|
4
4
|
import { WebauthnNotSupportedError } from './errors/WebauthnNotSupportedError.js';
|
|
5
5
|
import { logger } from './logger.js';
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const authenticateWebauthnCredential = (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
8
8
|
if (!browserSupportsWebAuthn()) {
|
|
9
9
|
throw new WebauthnNotSupportedError();
|
|
10
10
|
}
|
|
@@ -13,10 +13,10 @@ const verifyWebauthnCredential = (options) => __awaiter(void 0, void 0, void 0,
|
|
|
13
13
|
assertionResp = yield startAuthentication(options);
|
|
14
14
|
}
|
|
15
15
|
catch (error) {
|
|
16
|
-
logger.debug('Failed to
|
|
16
|
+
logger.debug('Failed to authenticate webauthn credential', error);
|
|
17
17
|
throw error;
|
|
18
18
|
}
|
|
19
19
|
return assertionResp;
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
export {
|
|
22
|
+
export { authenticateWebauthnCredential };
|
package/src/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthenticationResponseJSON, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialRequestOptionsJSON, RegistrationResponseJSON } from '@simplewebauthn/types';
|
|
2
2
|
export type CreateWebauthnCredentialOptions = PublicKeyCredentialCreationOptionsJSON;
|
|
3
3
|
export type CreateWebauthnCredentialsResponse = RegistrationResponseJSON;
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
4
|
+
export type AuthenticateWebauthnCredentialOptions = PublicKeyCredentialRequestOptionsJSON;
|
|
5
|
+
export type AuthenticateWebauthnCredentialsResponse = AuthenticationResponseJSON;
|