@passlock/client 2.1.0 → 2.3.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.
Files changed (45) hide show
  1. package/dist/index.d.ts +118 -22
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +123 -21
  4. package/dist/index.js.map +1 -1
  5. package/dist/internal/network.d.ts +14 -1
  6. package/dist/internal/network.d.ts.map +1 -1
  7. package/dist/internal/network.js +11 -1
  8. package/dist/internal/network.js.map +1 -1
  9. package/dist/internal/promise.d.ts +7 -3
  10. package/dist/internal/promise.d.ts.map +1 -1
  11. package/dist/internal/promise.js +9 -5
  12. package/dist/internal/promise.js.map +1 -1
  13. package/dist/internal/result.d.ts +33 -0
  14. package/dist/internal/result.d.ts.map +1 -0
  15. package/dist/internal/result.js +35 -0
  16. package/dist/internal/result.js.map +1 -0
  17. package/dist/logger.d.ts +11 -5
  18. package/dist/logger.d.ts.map +1 -1
  19. package/dist/logger.js +11 -5
  20. package/dist/logger.js.map +1 -1
  21. package/dist/options.d.ts +5 -5
  22. package/dist/options.d.ts.map +1 -1
  23. package/dist/passkey/authentication/authentication.d.ts +11 -4
  24. package/dist/passkey/authentication/authentication.d.ts.map +1 -1
  25. package/dist/passkey/authentication/authentication.js +5 -2
  26. package/dist/passkey/authentication/authentication.js.map +1 -1
  27. package/dist/passkey/errors.d.ts +19 -13
  28. package/dist/passkey/errors.d.ts.map +1 -1
  29. package/dist/passkey/errors.js +16 -16
  30. package/dist/passkey/errors.js.map +1 -1
  31. package/dist/passkey/registration/registration.d.ts +7 -4
  32. package/dist/passkey/registration/registration.d.ts.map +1 -1
  33. package/dist/passkey/registration/registration.js +4 -4
  34. package/dist/passkey/registration/registration.js.map +1 -1
  35. package/dist/passkey/shared.d.ts +16 -4
  36. package/dist/passkey/shared.d.ts.map +1 -1
  37. package/dist/passkey/signals/signals.d.ts +219 -29
  38. package/dist/passkey/signals/signals.d.ts.map +1 -1
  39. package/dist/passkey/signals/signals.js +144 -24
  40. package/dist/passkey/signals/signals.js.map +1 -1
  41. package/dist/safe.d.ts +181 -60
  42. package/dist/safe.d.ts.map +1 -1
  43. package/dist/safe.js +179 -54
  44. package/dist/safe.js.map +1 -1
  45. package/package.json +7 -7
package/dist/safe.js CHANGED
@@ -1,10 +1,22 @@
1
1
  /**
2
- * _safe_ functions i.e. functions that return discriminated unions composed of either a
3
- * success result or an error result for expected outcomes. Use one of the type guards to
4
- * narrow the result to a given success or error type.
2
+ * _safe_ functions i.e. functions that return result envelopes over the original
3
+ * tagged success and error payloads. Use `result.success` or `result.failure`
4
+ * to branch between success and error outcomes. Existing type guards and `_tag`
5
+ * checks remain supported.
5
6
  *
6
7
  * Note: unexpected runtime failures may still throw.
7
8
  *
9
+ * @example
10
+ * const result = await registerPasskey({ tenancyId, username: "jdoe@gmail.com" });
11
+ *
12
+ * if (result.success) {
13
+ * console.log(result.value.code);
14
+ * }
15
+ *
16
+ * if (result.failure) {
17
+ * console.log(result.error.message);
18
+ * }
19
+ *
8
20
  * @categoryDescription Passkeys (core)
9
21
  * Creating, authenticating, updating and deleting passkeys. {@link registerPasskey}
10
22
  * and {@link authenticatePasskey} are the key functions.
@@ -23,7 +35,7 @@ import { runToPromise } from "./internal/index.js";
23
35
  import { eventLogger, Logger } from "./logger.js";
24
36
  import { AuthenticationHelper, authenticatePasskey as authenticatePasskeyM, } from "./passkey/authentication/authentication.js";
25
37
  import { RegistrationHelper, registerPasskey as registerPasskeyM, } from "./passkey/registration/registration.js";
26
- import { deletePasskey as deletePasskeyM, isDeleteSuccess, isPasskeyDeleteSupport as isPasskeyDeleteSupportM, isPasskeyPruningSupport as isPasskeyPruningSupportM, isPasskeyUpdateSupport as isPasskeyUpdateSupportM, isPruningSuccess, isUpdateSuccess, prunePasskeys as prunePasskeysM, updatePasskey as updatePasskeyM, } from "./passkey/signals/signals.js";
38
+ import { deletePasskey as deletePasskeyM, deleteUserPasskeys as deleteUserPasskeysM, isDeleteSuccess, isPasskeyDeleteSupport as isPasskeyDeleteSupportM, isPasskeyPruningSupport as isPasskeyPruningSupportM, isPasskeyUpdateSupport as isPasskeyUpdateSupportM, isPruningSuccess, isUpdateSuccess, prunePasskeys as prunePasskeysM, updatePasskey as updatePasskeyM, updatePasskeyUsernames as updatePasskeyUsernamesM, } from "./passkey/signals/signals.js";
27
39
  /* Registration */
28
40
  /**
29
41
  * Registers a passkey on the user's device, then saves the server-side component in your vault.
@@ -33,11 +45,9 @@ import { deletePasskey as deletePasskeyM, isDeleteSuccess, isPasskeyDeleteSuppor
33
45
  *
34
46
  * @param options
35
47
  *
36
- * @returns Use {@link isRegistrationSuccess} to test for a successful result, {@link RegistrationError} is
37
- * an alias to a union of potential errors. Use one of the appropriate isXXX type guards to narrow
38
- * the error.
39
- *
40
- * Alternatively test the result's `_tag` property, which acts as a union discriminator.
48
+ * @returns A {@link PasslockClient} whose success branch contains a {@link RegistrationSuccess}
49
+ * and whose error branch contains a {@link RegistrationError}. Existing
50
+ * {@link isRegistrationSuccess} checks and `_tag` discrimination still work.
41
51
  *
42
52
  * @see {@link isRegistrationSuccess}
43
53
  * @see {@link isPasskeyUnsupportedError}
@@ -51,15 +61,15 @@ import { deletePasskey as deletePasskeyM, isDeleteSuccess, isPasskeyDeleteSuppor
51
61
  *
52
62
  * const result = await registerPasskey({ tenancyId, username });
53
63
  *
54
- * if (isRegistrationSuccess(result)) {
64
+ * if (result.success) {
55
65
  * // send this to your backend for verification
56
- * console.log(result.code);
57
- * } else if (isPasskeyUnsupportedError(result)) {
66
+ * console.log(result.value.code);
67
+ * } else if (result.failure && isPasskeyUnsupportedError(result.error)) {
58
68
  * // ^^ using an error type guard
59
69
  * console.log("Device does not support passkeys");
60
- * } else if (result._tag === "@error/OtherPasskey") {
70
+ * } else if (result.failure && result.error._tag === "@error/OtherPasskey") {
61
71
  * // ^^ narrowing the result using the _tag
62
- * console.log(result.message);
72
+ * console.log(result.error.message);
63
73
  * } else {
64
74
  * ...
65
75
  * }
@@ -78,11 +88,10 @@ logger = eventLogger) => pipe(registerPasskeyM(options), Micro.provideService(Re
78
88
  *
79
89
  * @param options
80
90
  *
81
- * @returns Use {@link isAuthenticationSuccess} to test for a successful result, {@link AuthenticationError} is
82
- * an alias to a union of potential errors. Use one of the appropriate isXXX type guards to narrow
83
- * the error.
84
- *
85
- * Alternatively test the result's `_tag` property, which acts as a union discriminator.
91
+ * @returns A {@link PasslockClient} whose success branch contains an
92
+ * {@link AuthenticationSuccess} and whose error branch contains an
93
+ * {@link AuthenticationError}. Existing {@link isAuthenticationSuccess}
94
+ * checks and `_tag` discrimination still work.
86
95
  *
87
96
  * @see {@link isAuthenticationSuccess}
88
97
  * @see {@link isPasskeyUnsupportedError}
@@ -95,15 +104,15 @@ logger = eventLogger) => pipe(registerPasskeyM(options), Micro.provideService(Re
95
104
  *
96
105
  * const result = await authenticatePasskey({ tenancyId });
97
106
  *
98
- * if (isAuthenticationSuccess(result)) {
107
+ * if (result.success) {
99
108
  * // send this to your backend for verification
100
- * console.log(result.code);
101
- * } else if (isPasskeyUnsupportedError(result)) {
109
+ * console.log(result.value.code);
110
+ * } else if (result.failure && isPasskeyUnsupportedError(result.error)) {
102
111
  * // ^^ using an error type guard
103
112
  * console.log("Device does not support passkeys");
104
- * } else if (result._tag === "@error/OtherPasskey") {
113
+ * } else if (result.failure && result.error._tag === "@error/OtherPasskey") {
105
114
  * // ^^ narrowing the result using the _tag
106
- * console.log(result.message);
115
+ * console.log(result.error.message);
107
116
  * }
108
117
  *
109
118
  * @category Passkeys (core)
@@ -122,11 +131,19 @@ logger = eventLogger) => pipe(authenticatePasskeyM(options), Micro.provideServic
122
131
  *
123
132
  * By calling this function and supplying a new username/display name, their local
124
133
  * password manager will align with their updated account identifier.
125
- *
126
- * @param options You will typically supply a target `passkeyId` via {@link UpdatePasskeyOptions}. {@link UpdateCredentialOptions} is for advanced use cases.
127
- * @returns Use {@link isUpdateSuccess} and {@link isUpdateError} to test the update status.
128
- *
129
- * Alternatively, examine the result's `_tag` property, which acts as a discriminator.
134
+ * Support and metadata lookup failures populate the error branch as
135
+ * {@link UpdateError}. Browser-side signalling failures are logged as warnings
136
+ * and do not populate the error branch.
137
+ *
138
+ * @param options You will typically supply a target `passkeyId` via
139
+ * {@link UpdatePasskeyOptions}. {@link UpdateCredentialOptions} is intended
140
+ * for credential-scoped updates, for example when replaying data returned by
141
+ * `@passlock/server`.
142
+ * @returns A {@link PasslockClient} whose success branch contains an
143
+ * {@link UpdateSuccess} after the local update workflow has been started, and
144
+ * whose error branch contains an {@link UpdateError}.
145
+ * Existing {@link isUpdateSuccess}, {@link isUpdateError}, and `_tag` checks
146
+ * still work.
130
147
  *
131
148
  * @see {@link isUpdateSuccess}
132
149
  * @see {@link isUpdateError}
@@ -140,12 +157,11 @@ logger = eventLogger) => pipe(authenticatePasskeyM(options), Micro.provideServic
140
157
  *
141
158
  * const result = await updatePasskey({ tenancyId, passkeyId, username, displayName });
142
159
  *
143
- * if (result._tag === "UpdateSuccess") {
144
- * // ^^ narrowing the result using the _tag
145
- * console.log("passkey updated locally");
146
- * } else if (isUpdateError(result)) {
160
+ * if (result.success) {
161
+ * console.log("passkey update requested");
162
+ * } else if (result.failure && isUpdateError(result.error)) {
147
163
  * // narrowed to an UpdateError type
148
- * console.log(result.code);
164
+ * console.log(result.error.code);
149
165
  * } else {
150
166
  * console.log("unable to update passkey");
151
167
  * }
@@ -159,7 +175,105 @@ logger = eventLogger) => {
159
175
  return pipe(micro, Micro.provideService(Logger, logger), runToPromise);
160
176
  };
161
177
  /**
162
- * Attempts to delete a passkey from a local device. There are two scenarios in which this function is useful:
178
+ * Attempt to update the username and/or display name for multiple passkeys (client-side only).
179
+ *
180
+ * Useful if the user has changed their account identifier. For example, they register
181
+ * using jdoe@gmail.com but later change their account username to jdoe@yahoo.com.
182
+ * Even after you update their account details in your backend, their local password
183
+ * manager will continue to display jdoe@gmail.com.
184
+ *
185
+ * By calling this function and supplying a new username/display name, their local
186
+ * password manager will align with their updated account identifier.
187
+ * Support failures populate the error branch as {@link UpdateError}.
188
+ * Browser-side signalling failures are logged as warnings and do not populate
189
+ * the error branch.
190
+ *
191
+ * @param options The `credentials` array returned by
192
+ * `@passlock/server/safe`'s `updatePasskeyUsernames` success branch.
193
+ * @returns A {@link PasslockClient} whose success branch contains an
194
+ * {@link UpdateSuccess} after the local update workflows have been started,
195
+ * and whose error branch contains an {@link UpdateError}.
196
+ * Existing {@link isUpdateSuccess}, {@link isUpdateError}, and `_tag` checks
197
+ * still work.
198
+ *
199
+ * @see {@link isUpdateSuccess}
200
+ * @see {@link isUpdateError}
201
+ *
202
+ * @example
203
+ * // server code
204
+ * import { updatePasskeyUsernames as updatePasskeyUsernamesOnServer } from "@passlock/server/safe";
205
+ *
206
+ * const backendResult = await updatePasskeyUsernamesOnServer({
207
+ * tenancyId,
208
+ * userId,
209
+ * username,
210
+ * displayName,
211
+ * });
212
+ * // send backendResult.value.credentials to your frontend when backendResult.success
213
+ *
214
+ * // client code
215
+ * import { updatePasskeyUsernames } from "@passlock/client/safe";
216
+ *
217
+ * const credentialsFromBackend = backendResult.value.credentials;
218
+ * const result = await updatePasskeyUsernames(credentialsFromBackend);
219
+ * console.log(result);
220
+ *
221
+ * @category Passkeys (core)
222
+ */
223
+ export const updatePasskeyUsernames = (options,
224
+ /** @hidden */
225
+ logger = eventLogger) => {
226
+ const micro = updatePasskeyUsernamesM(options);
227
+ return pipe(micro, Micro.provideService(Logger, logger), runToPromise);
228
+ };
229
+ /**
230
+ * Attempt to signal removal of multiple passkeys from a local device.
231
+ *
232
+ * Use this after deleting the server-side passkeys. The `deleted` array returned
233
+ * by `@passlock/server/safe` already has the right shape, so you can pass it
234
+ * straight into this function.
235
+ * Support failures populate the error branch as {@link DeleteError}.
236
+ * Browser-side signalling failures are logged as warnings and do not populate
237
+ * the error branch.
238
+ *
239
+ * @param options Credentials derived from deleted backend passkeys.
240
+ * @returns A {@link PasslockClient} whose success branch contains a
241
+ * {@link DeleteSuccess} once the local removal workflows have been started,
242
+ * and whose error branch contains a {@link DeleteError}. Existing
243
+ * {@link isDeleteSuccess}, {@link isDeleteError}, and `_tag` checks still work.
244
+ * @see {@link isDeleteSuccess}
245
+ * @see {@link isDeleteError}
246
+ *
247
+ * @example
248
+ * // server code
249
+ * import { deleteUserPasskeys as deleteUserPasskeysOnServer } from "@passlock/server/safe";
250
+ *
251
+ * const backendResult = await deleteUserPasskeysOnServer({
252
+ * tenancyId,
253
+ * userId,
254
+ * apiKey,
255
+ * });
256
+ *
257
+ * // send backendResult.value.deleted to your frontend when backendResult.success
258
+ *
259
+ * // client code
260
+ * import { deleteUserPasskeys } from "@passlock/client/safe";
261
+ *
262
+ * const deletedCredentials = backendResult.value.deleted;
263
+ * const result = await deleteUserPasskeys(deletedCredentials);
264
+ * console.log(result);
265
+ *
266
+ * @category Passkeys (core)
267
+ */
268
+ export const deleteUserPasskeys = (options,
269
+ /** @hidden */
270
+ logger = eventLogger) => {
271
+ const micro = deleteUserPasskeysM(options);
272
+ return pipe(micro, Micro.provideService(Logger, logger), runToPromise);
273
+ };
274
+ /**
275
+ * Attempts to signal removal of a passkey from a local device. There are two
276
+ * scenarios in which this function is useful:
163
277
  *
164
278
  * 1. **Deleting a passkey** - Use the `@passlock/server` package or make vanilla REST calls from your
165
279
  * backend to delete the server-side component, then use this function to delete the client-side component.
@@ -169,10 +283,17 @@ logger = eventLogger) => {
169
283
  *
170
284
  * See [deleting passkeys](https://passlock.dev/passkeys/passkey-removal/) and
171
285
  * [handling missing passkeys](https://passlock.dev/handling-missing-passkeys/) in the documentation.
172
- *
173
- * @param options You will typically pass {@link DeletePasskeyOptions}, the other types are for advanced use cases/optimizations.
174
- * @returns Use {@link isDeleteSuccess} to test for a successful deletion, or {@link isDeleteError} to test for an error.
175
- * Alternatively, test the result's `_tag` property, which acts as a discriminator.
286
+ * Support and metadata lookup failures populate the error branch as
287
+ * {@link DeleteError}. Browser-side signalling failures are logged as warnings
288
+ * and do not populate the error branch.
289
+ *
290
+ * @param options You will typically pass {@link DeletePasskeyOptions}. Use
291
+ * {@link DeleteCredentialOptions} or {@link OrphanedPasskeyError} when you
292
+ * already have the credential metadata.
293
+ * @returns A {@link PasslockClient} whose success branch contains a
294
+ * {@link DeleteSuccess} once the local removal workflow has been started, and
295
+ * whose error branch contains a {@link DeleteError}. Existing
296
+ * {@link isDeleteSuccess}, {@link isDeleteError}, and `_tag` checks still work.
176
297
  * @see {@link isDeleteSuccess}
177
298
  * @see {@link isDeleteError}
178
299
  *
@@ -183,12 +304,11 @@ logger = eventLogger) => {
183
304
  *
184
305
  * const result = await deletePasskey({ tenancyId, passkeyId });
185
306
  *
186
- * if (result._tag === "DeleteSuccess") {
187
- * // ^^ narrowing the result using the _tag
188
- * console.log("passkey deleted locally");
189
- * } else if (isDeleteError(result)) {
307
+ * if (result.success) {
308
+ * console.log("passkey removal requested");
309
+ * } else if (result.failure && isDeleteError(result.error)) {
190
310
  * // narrowed to a DeleteError type
191
- * console.log(result.code);
311
+ * console.log(result.error.code);
192
312
  * } else {
193
313
  * console.log("unable to delete passkey");
194
314
  * }
@@ -206,10 +326,16 @@ logger = eventLogger) => {
206
326
  *
207
327
  * This is useful when your backend is the source of truth for which passkeys
208
328
  * should still exist for a given account on this device.
329
+ * Support and metadata lookup failures populate the error branch as
330
+ * {@link PruningError}. Browser-side signalling failures are logged as
331
+ * warnings and do not populate the error branch.
209
332
  *
210
333
  * @param options Pass the passkeys you **want to retain**.
211
- * @returns Use {@link isPruningSuccess} and {@link isPruningError} to narrow the result.
212
- * Alternatively test the result's `_tag` property, which acts as a discriminator.
334
+ * @returns A {@link PasslockClient} whose success branch contains a
335
+ * {@link PruningSuccess} once the accepted-credentials signalling attempt has
336
+ * completed, and whose error branch contains a
337
+ * {@link PruningError}. Existing {@link isPruningSuccess},
338
+ * {@link isPruningError}, and `_tag` checks still work.
213
339
  *
214
340
  * @see {@link isPruningSuccess}
215
341
  * @see {@link isPruningError}
@@ -221,12 +347,11 @@ logger = eventLogger) => {
221
347
  *
222
348
  * const result = await prunePasskeys({ tenancyId, allowablePasskeyIds });
223
349
  *
224
- * if (result._tag === "PruningSuccess") {
225
- * // ^^ narrowing the result using the _tag
226
- * console.log("local passkeys pruned");
227
- * } else if (isPruningError(result)) {
350
+ * if (result.success) {
351
+ * console.log("accepted credentials sync requested");
352
+ * } else if (result.failure && isPruningError(result.error)) {
228
353
  * // narrowed to a PruningError type
229
- * console.log(result.code);
354
+ * console.log(result.error.code);
230
355
  * } else {
231
356
  * console.log("unable to prune passkeys");
232
357
  * }
@@ -241,7 +366,7 @@ logger = eventLogger) => {
241
366
  };
242
367
  /* Support */
243
368
  /**
244
- * Does the local device support programmatic passkey deletion
369
+ * Does the local device support programmatic passkey deletion?
245
370
  *
246
371
  * @returns `true` if local passkey deletion is supported.
247
372
  *
@@ -249,7 +374,7 @@ logger = eventLogger) => {
249
374
  */
250
375
  export const isPasskeyDeleteSupport = () => pipe(isPasskeyDeleteSupportM, Micro.runSync);
251
376
  /**
252
- * Does the local device support programmatic passkey pruning
377
+ * Does the local device support programmatic passkey pruning?
253
378
  *
254
379
  * @returns `true` if local passkey pruning is supported.
255
380
  *
@@ -257,7 +382,7 @@ export const isPasskeyDeleteSupport = () => pipe(isPasskeyDeleteSupportM, Micro.
257
382
  */
258
383
  export const isPasskeyPruningSupport = () => pipe(isPasskeyPruningSupportM, Micro.runSync);
259
384
  /**
260
- * Does the local device support programmatic passkey updates
385
+ * Does the local device support programmatic passkey updates?
261
386
  *
262
387
  * @returns `true` if local passkey updates are supported.
263
388
  *
package/dist/safe.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"safe.js","sourceRoot":"","sources":["../src/safe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,WAAW,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@passlock/client",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "description": "Flexible passkey authentication for Astro, SvelteKit, NextJS and other frameworks",
5
5
  "keywords": [
6
6
  "passkey",
@@ -47,16 +47,16 @@
47
47
  "dist"
48
48
  ],
49
49
  "dependencies": {
50
- "@simplewebauthn/browser": "^13.2.2",
51
- "effect": "3.19.19"
50
+ "@simplewebauthn/browser": "^13.3.0",
51
+ "effect": "3.20.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@biomejs/biome": "^2.4.6",
55
- "@effect/language-service": "^0.78.0",
54
+ "@biomejs/biome": "^2.4.8",
55
+ "@effect/language-service": "^0.80.0",
56
56
  "@fetch-mock/vitest": "^0.2.18",
57
- "@typescript/lib-dom": "npm:@types/web@^0.0.339",
57
+ "@typescript/lib-dom": "npm:@types/web@^0.0.344",
58
58
  "globals": "^17.4.0",
59
- "npm-check-updates": "^19.6.3",
59
+ "npm-check-updates": "^19.6.5",
60
60
  "publint": "0.3.18",
61
61
  "rimraf": "^6.1.3",
62
62
  "tsx": "4.21.0",