@dfns/sdk-react-native 0.4.1 → 0.4.2
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/index.js +6 -14
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -21,11 +21,7 @@ class AndroidPasskeys {
|
|
|
21
21
|
async sign(challenge) {
|
|
22
22
|
const request = {
|
|
23
23
|
challenge: challenge.challenge,
|
|
24
|
-
allowCredentials: challenge.allowCredentials.webauthn
|
|
25
|
-
id: id,
|
|
26
|
-
type,
|
|
27
|
-
transports: transports ?? [],
|
|
28
|
-
})),
|
|
24
|
+
allowCredentials: challenge.allowCredentials.webauthn,
|
|
29
25
|
rpId: challenge.rp.id,
|
|
30
26
|
userVerification: challenge.userVerification,
|
|
31
27
|
timeout: this.options?.timeout ?? exports.DEFAULT_WAIT_TIMEOUT,
|
|
@@ -53,10 +49,7 @@ class AndroidPasskeys {
|
|
|
53
49
|
name: challenge.user.name,
|
|
54
50
|
},
|
|
55
51
|
attestation: challenge.attestation,
|
|
56
|
-
excludeCredentials: challenge.excludeCredentials
|
|
57
|
-
id: cred.id,
|
|
58
|
-
type: cred.type,
|
|
59
|
-
})),
|
|
52
|
+
excludeCredentials: challenge.excludeCredentials,
|
|
60
53
|
authenticatorSelection: challenge.authenticatorSelection,
|
|
61
54
|
timeout: this.options?.timeout ?? exports.DEFAULT_WAIT_TIMEOUT,
|
|
62
55
|
};
|
|
@@ -81,10 +74,9 @@ class iOSPasskeys {
|
|
|
81
74
|
async sign(challenge) {
|
|
82
75
|
const request = {
|
|
83
76
|
challenge: b64UrlSafeToStandard(challenge.challenge),
|
|
84
|
-
allowCredentials: challenge.allowCredentials.webauthn.map(({ id, type
|
|
77
|
+
allowCredentials: challenge.allowCredentials.webauthn.map(({ id, type }) => ({
|
|
85
78
|
id: b64UrlSafeToStandard(id),
|
|
86
79
|
type,
|
|
87
|
-
transports: transports ?? [],
|
|
88
80
|
})),
|
|
89
81
|
rpId: challenge.rp.id,
|
|
90
82
|
userVerification: 'preferred',
|
|
@@ -113,9 +105,9 @@ class iOSPasskeys {
|
|
|
113
105
|
name: challenge.user.name,
|
|
114
106
|
},
|
|
115
107
|
attestation: challenge.attestation,
|
|
116
|
-
excludeCredentials: challenge.excludeCredentials.map((
|
|
117
|
-
id:
|
|
118
|
-
type
|
|
108
|
+
excludeCredentials: challenge.excludeCredentials.map(({ id, type }) => ({
|
|
109
|
+
id: b64UrlSafeToStandard(id),
|
|
110
|
+
type,
|
|
119
111
|
})),
|
|
120
112
|
authenticatorSelection: challenge.authenticatorSelection,
|
|
121
113
|
timeout: this.options?.timeout ?? exports.DEFAULT_WAIT_TIMEOUT,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dfns/sdk-react-native",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"buffer": "6.0.3",
|
|
6
6
|
"cross-fetch": "3.1.6",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"uuid": "9.0.0"
|
|
10
10
|
},
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"@dfns/sdk": "0.4.
|
|
12
|
+
"@dfns/sdk": "0.4.2"
|
|
13
13
|
},
|
|
14
14
|
"main": "./index.js",
|
|
15
15
|
"type": "commonjs"
|