@dfns/sdk-browser 0.7.12-rc.1 → 0.7.12
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/package.json +2 -6
- package/signers/key.js +1 -1
- package/signers/webauthn.js +2 -2
package/package.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dfns/sdk-browser",
|
|
3
|
-
"version": "0.7.12
|
|
3
|
+
"version": "0.7.12",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"buffer": "6.0.3"
|
|
6
|
-
"cross-fetch": "3.1.6"
|
|
7
|
-
},
|
|
8
|
-
"peerDependencies": {
|
|
9
|
-
"@dfns/sdk": "0.7.12-rc.1"
|
|
5
|
+
"buffer": "6.0.3"
|
|
10
6
|
},
|
|
11
7
|
"main": "./index.js",
|
|
12
8
|
"type": "commonjs"
|
package/signers/key.js
CHANGED
|
@@ -36,7 +36,7 @@ class BrowserKeySigner {
|
|
|
36
36
|
const signature = (0, utils_1.rawSignatureToAns1)(new Uint8Array(rawSignature));
|
|
37
37
|
const attestationData = JSON.stringify({
|
|
38
38
|
publicKey: publicKeyPem,
|
|
39
|
-
signature: (0, utils_1.toHex)(signature),
|
|
39
|
+
signature: (0, utils_1.toHex)(signature.buffer),
|
|
40
40
|
});
|
|
41
41
|
return {
|
|
42
42
|
credentialKind: 'Key',
|
package/signers/webauthn.js
CHANGED
|
@@ -17,7 +17,7 @@ class WebAuthnSigner {
|
|
|
17
17
|
publicKey: {
|
|
18
18
|
challenge: buffer_1.Buffer.from(challenge.challenge),
|
|
19
19
|
allowCredentials: challenge.allowCredentials.webauthn.map(({ id, type }) => ({
|
|
20
|
-
id: (0, utils_1.fromBase64Url)(id),
|
|
20
|
+
id: (0, utils_1.fromBase64Url)(id).buffer,
|
|
21
21
|
type,
|
|
22
22
|
})),
|
|
23
23
|
rpId: this.conf.relyingParty.id,
|
|
@@ -54,7 +54,7 @@ class WebAuthnSigner {
|
|
|
54
54
|
},
|
|
55
55
|
attestation: challenge.attestation,
|
|
56
56
|
excludeCredentials: challenge.excludeCredentials.map(({ id, type }) => ({
|
|
57
|
-
id: (0, utils_1.fromBase64Url)(id),
|
|
57
|
+
id: (0, utils_1.fromBase64Url)(id).buffer,
|
|
58
58
|
type,
|
|
59
59
|
})),
|
|
60
60
|
authenticatorSelection: challenge.authenticatorSelection,
|