passkey-kit 0.10.2 → 0.10.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/kit.ts +7 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "passkey-kit",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "description": "A helper library for creating and using smart wallet accounts on the Stellar blockchain.",
5
5
  "author": "Tyler van der Hoeven",
6
6
  "license": "MIT",
package/src/kit.ts CHANGED
@@ -91,7 +91,10 @@ export class PasskeyKit extends PasskeyBase {
91
91
  }) {
92
92
  const now = new Date()
93
93
  const displayName = `${user} — ${now.toLocaleString()}`
94
- const { rpId, authenticatorSelection } = settings || {}
94
+ const { rpId, authenticatorSelection = {
95
+ residentKey: "preferred",
96
+ userVerification: "preferred",
97
+ } } = settings || {}
95
98
  const { id, response } = await this.WebAuthn.startRegistration({
96
99
  optionsJSON: {
97
100
  challenge: base64url("stellaristhebetterblockchain"),
@@ -106,8 +109,6 @@ export class PasskeyKit extends PasskeyBase {
106
109
  },
107
110
  authenticatorSelection,
108
111
  pubKeyCredParams: [{ alg: -7, type: "public-key" }],
109
- // attestation: "none",
110
- // timeout: 120_000,
111
112
  }
112
113
  });
113
114
 
@@ -134,8 +135,7 @@ export class PasskeyKit extends PasskeyBase {
134
135
  optionsJSON: {
135
136
  challenge: base64url("stellaristhebetterblockchain"),
136
137
  rpId,
137
- // userVerification: "discouraged",
138
- // timeout: 120_000
138
+ userVerification: "preferred",
139
139
  }
140
140
  });
141
141
 
@@ -277,8 +277,7 @@ export class PasskeyKit extends PasskeyBase {
277
277
  ? {
278
278
  challenge: base64url(payload),
279
279
  rpId,
280
- // userVerification: "discouraged",
281
- // timeout: 120_000
280
+ userVerification: "preferred",
282
281
  }
283
282
  : {
284
283
  challenge: base64url(payload),
@@ -291,8 +290,7 @@ export class PasskeyKit extends PasskeyBase {
291
290
  type: "public-key",
292
291
  },
293
292
  ],
294
- // userVerification: "discouraged",
295
- // timeout: 120_000
293
+ userVerification: "preferred",
296
294
  }
297
295
  });
298
296