@passlock/client 2.0.0 → 2.0.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.
Files changed (103) hide show
  1. package/README.md +14 -16
  2. package/README.template.md +14 -16
  3. package/dist/errors.d.ts +4 -0
  4. package/dist/errors.d.ts.map +1 -0
  5. package/dist/errors.js +14 -0
  6. package/dist/errors.js.map +1 -0
  7. package/dist/index.d.ts +245 -4
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +253 -3
  10. package/dist/index.js.map +1 -1
  11. package/dist/internal/index.d.ts +4 -0
  12. package/dist/internal/index.d.ts.map +1 -0
  13. package/dist/internal/index.js +4 -0
  14. package/dist/internal/index.js.map +1 -0
  15. package/dist/{shared → internal}/network.d.ts +19 -16
  16. package/dist/internal/network.d.ts.map +1 -0
  17. package/dist/{shared → internal}/network.js +40 -25
  18. package/dist/internal/network.js.map +1 -0
  19. package/dist/{shared → internal}/promise.d.ts +2 -2
  20. package/dist/internal/promise.d.ts.map +1 -0
  21. package/dist/{shared → internal}/promise.js +2 -2
  22. package/dist/internal/promise.js.map +1 -0
  23. package/dist/internal/tenancy.d.ts.map +1 -0
  24. package/dist/internal/tenancy.js.map +1 -0
  25. package/dist/{logger/index.d.ts → logger.d.ts} +19 -4
  26. package/dist/logger.d.ts.map +1 -0
  27. package/dist/{logger/index.js → logger.js} +19 -4
  28. package/dist/logger.js.map +1 -0
  29. package/dist/{shared/options.d.ts → options.d.ts} +4 -0
  30. package/dist/options.d.ts.map +1 -0
  31. package/dist/{shared/options.js.map → options.js.map} +1 -1
  32. package/dist/passkey/authentication/authentication.d.ts +82 -66
  33. package/dist/passkey/authentication/authentication.d.ts.map +1 -1
  34. package/dist/passkey/authentication/authentication.js +67 -49
  35. package/dist/passkey/authentication/authentication.js.map +1 -1
  36. package/dist/passkey/errors.d.ts +158 -16
  37. package/dist/passkey/errors.d.ts.map +1 -1
  38. package/dist/passkey/errors.js +214 -6
  39. package/dist/passkey/errors.js.map +1 -1
  40. package/dist/passkey/registration/registration.d.ts +81 -72
  41. package/dist/passkey/registration/registration.d.ts.map +1 -1
  42. package/dist/passkey/registration/registration.js +42 -35
  43. package/dist/passkey/registration/registration.js.map +1 -1
  44. package/dist/passkey/{types.d.ts → shared.d.ts} +9 -3
  45. package/dist/passkey/shared.d.ts.map +1 -0
  46. package/dist/passkey/shared.js +2 -0
  47. package/dist/passkey/shared.js.map +1 -0
  48. package/dist/passkey/signals/signals.d.ts +93 -35
  49. package/dist/passkey/signals/signals.d.ts.map +1 -1
  50. package/dist/passkey/signals/signals.js +197 -90
  51. package/dist/passkey/signals/signals.js.map +1 -1
  52. package/dist/passkey/support.d.ts +15 -0
  53. package/dist/passkey/support.d.ts.map +1 -1
  54. package/dist/passkey/support.js +16 -1
  55. package/dist/passkey/support.js.map +1 -1
  56. package/dist/principal.d.ts +16 -0
  57. package/dist/principal.d.ts.map +1 -0
  58. package/dist/principal.js +2 -0
  59. package/dist/principal.js.map +1 -0
  60. package/dist/safe.d.ts +247 -0
  61. package/dist/safe.d.ts.map +1 -0
  62. package/dist/safe.js +254 -0
  63. package/dist/safe.js.map +1 -0
  64. package/package.json +26 -21
  65. package/dist/logger/index.d.ts.map +0 -1
  66. package/dist/logger/index.js.map +0 -1
  67. package/dist/passkey/authentication/authentication.test.d.ts +0 -2
  68. package/dist/passkey/authentication/authentication.test.d.ts.map +0 -1
  69. package/dist/passkey/authentication/authentication.test.js +0 -157
  70. package/dist/passkey/authentication/authentication.test.js.map +0 -1
  71. package/dist/passkey/authentication/index.d.ts +0 -21
  72. package/dist/passkey/authentication/index.d.ts.map +0 -1
  73. package/dist/passkey/authentication/index.js +0 -22
  74. package/dist/passkey/authentication/index.js.map +0 -1
  75. package/dist/passkey/index.d.ts +0 -6
  76. package/dist/passkey/index.d.ts.map +0 -1
  77. package/dist/passkey/index.js +0 -6
  78. package/dist/passkey/index.js.map +0 -1
  79. package/dist/passkey/registration/index.d.ts +0 -19
  80. package/dist/passkey/registration/index.d.ts.map +0 -1
  81. package/dist/passkey/registration/index.js +0 -20
  82. package/dist/passkey/registration/index.js.map +0 -1
  83. package/dist/passkey/registration/registration.test.d.ts +0 -2
  84. package/dist/passkey/registration/registration.test.d.ts.map +0 -1
  85. package/dist/passkey/registration/registration.test.js +0 -161
  86. package/dist/passkey/registration/registration.test.js.map +0 -1
  87. package/dist/passkey/signals/index.d.ts +0 -9
  88. package/dist/passkey/signals/index.d.ts.map +0 -1
  89. package/dist/passkey/signals/index.js +0 -19
  90. package/dist/passkey/signals/index.js.map +0 -1
  91. package/dist/passkey/types.d.ts.map +0 -1
  92. package/dist/passkey/types.js +0 -2
  93. package/dist/passkey/types.js.map +0 -1
  94. package/dist/shared/network.d.ts.map +0 -1
  95. package/dist/shared/network.js.map +0 -1
  96. package/dist/shared/options.d.ts.map +0 -1
  97. package/dist/shared/promise.d.ts.map +0 -1
  98. package/dist/shared/promise.js.map +0 -1
  99. package/dist/shared/tenancy.d.ts.map +0 -1
  100. package/dist/shared/tenancy.js.map +0 -1
  101. /package/dist/{shared → internal}/tenancy.d.ts +0 -0
  102. /package/dist/{shared → internal}/tenancy.js +0 -0
  103. /package/dist/{shared/options.js → options.js} +0 -0
package/dist/safe.d.ts ADDED
@@ -0,0 +1,247 @@
1
+ /**
2
+ * _safe_ functions i.e. functions that do not throw but instead return discriminated union
3
+ * types composed of a successful result or an error. Use one of the type guards to narrow
4
+ * the result to a given success or error type.
5
+ *
6
+ * @categoryDescription Passkeys (core)
7
+ * Creating, updating, authenticating and deleting passkeys. {@link registerPasskey}
8
+ * and {@link authenticatePasskey} are the primary functions.
9
+ *
10
+ * @categoryDescription Passkeys (other)
11
+ * Testing for browser capabilities related to passkeys, type guards and other utilities.
12
+ *
13
+ * @categoryDescription Passkeys (errors)
14
+ * Errors that could be returned by a function.
15
+ *
16
+ * @showCategories
17
+ * @module safe
18
+ */
19
+ import { Logger } from "./logger";
20
+ import type { PasslockOptions } from "./options";
21
+ import type { AuthenticationError, AuthenticationOptions, AuthenticationSuccess } from "./passkey/authentication/authentication";
22
+ import type { DeleteError, PasskeyNotFoundError, PruningError, UpdateError } from "./passkey/errors";
23
+ import type { RegistrationError, RegistrationOptions, RegistrationSuccess } from "./passkey/registration/registration";
24
+ import type { CredentialMapping, UpdatePasskeyOptions } from "./passkey/signals/signals";
25
+ /**
26
+ * Registers a passkey on the user's device, then saves the server-side component in your vault.
27
+ * If successful, this function returns a `code` or `id_token` (JWT). The code and/or jwt should
28
+ * be sent to your backend for verification. See
29
+ * [register a passkey](https://passlock.dev/passkeys/registration/) in the documentation.
30
+ *
31
+ * @param options
32
+ *
33
+ * @returns Use {@link isRegistrationSuccess} to test for a successful result, `RegistrationError` is
34
+ * an alias to a union of potential errors. Use one of the appropriate isXXX type guards to narrow
35
+ * the error.
36
+ *
37
+ * @see {@link isRegistrationSuccess}
38
+ * @see {@link isPasskeyUnsupportedError}
39
+ * @see {@link isDuplicatePasskeyError}
40
+ * @see {@link isOtherPasskeyError}
41
+ *
42
+ * @example
43
+ * // from your Passlock console settings
44
+ * const tenancyId = "myTenancyId";
45
+ * const username = "jdoe@gmail.com";
46
+ *
47
+ * const result = await registerPasskey({ tenancyId, username });
48
+ *
49
+ * if (isRegistrationSuccess(result)) {
50
+ * // send this to your backend for verification
51
+ * console.log(result.code);
52
+ * } else if (isPasskeyUnsupportedError(result)) {
53
+ * console.error("Device does not support passkeys");
54
+ * } else {
55
+ * console.error(result.message);
56
+ * }
57
+ *
58
+ * @category Passkeys (core)
59
+ */
60
+ export declare const registerPasskey: (options: RegistrationOptions,
61
+ /** @hidden */
62
+ logger?: typeof Logger.Service) => Promise<RegistrationSuccess | RegistrationError>;
63
+ /**
64
+ * Asks the client to present a passkey, which is then verified against the server-side component in your vault.
65
+ * If successful, this function returns a `code` or `id_token` (JWT). The code and/or jwt should
66
+ * be sent to your backend for verification. See
67
+ * [authenticate a passkey](https://passlock.dev/passkeys/authentication/) in the documentation.
68
+ *
69
+ * @param options
70
+ *
71
+ * @returns Use {@link isAuthenticationSuccess} to test for a successful result, `AuthenticationError` is
72
+ * an alias to a union of potential errors. Use one of the appropriate isXXX type guards to narrow
73
+ * the error.
74
+ *
75
+ * @see {@link isAuthenticationSuccess}
76
+ * @see {@link isPasskeyUnsupportedError}
77
+ * @see {@link isPasskeyNotFoundError}
78
+ * @see {@link isOtherPasskeyError}
79
+ *
80
+ * @example
81
+ * // from your Passlock console settings
82
+ * const tenancyId = "myTenancyId";
83
+ *
84
+ * const result = await authenticatePasskey({ tenancyId });
85
+ *
86
+ * if (isAuthenticationSuccess(result)) {
87
+ * // send this to your backend for verification
88
+ * console.log(result.code);
89
+ * } else if (isPasskeyUnsupportedError(result)) {
90
+ * console.error("Device does not support passkeys");
91
+ * } else {
92
+ * console.error(result.message);
93
+ * }
94
+ *
95
+ * @category Passkeys (core)
96
+ */
97
+ export declare const authenticatePasskey: (options: AuthenticationOptions,
98
+ /** @hidden */
99
+ logger?: typeof Logger.Service) => Promise<AuthenticationSuccess | AuthenticationError>;
100
+ /**
101
+ * Attempt to update the username or display name for a passkey (client-side only).
102
+ *
103
+ * Useful if the user has changed their account identifier. For example, they register
104
+ * using jdoe@gmail.com but later change their account username to jdoe@yahoo.com.
105
+ * Even after you update their account details in your backend, their local password
106
+ * manager will continue to display jdoe@gmail.com.
107
+ *
108
+ * By calling this function and supplying a new username/display name, their local
109
+ * password manager will align with their updated account identifier.
110
+ *
111
+ * @param options
112
+ * @returns Update status
113
+ * @see {@link isUpdateError}
114
+ *
115
+ * @example
116
+ * // from your Passlock console settings
117
+ * const tenancyId = "myTenancyId";
118
+ * const passkeyId = "myPasskeyId";
119
+ * const username = "newUsername@gmail.com";
120
+ * const displayName = "New Account Name";
121
+ *
122
+ * const result = await updatePasskey({ tenancyId, passkeyId, username, displayName });
123
+ *
124
+ * if (result === true) {
125
+ * console.log("passkey updated locally");
126
+ * } else if (isUpdateError(result)) {
127
+ * // narrowed to an UpdateError type
128
+ * console.error(result.code);
129
+ * } else {
130
+ * console.error("unable to update passkey");
131
+ * }
132
+ *
133
+ * @category Passkeys (core)
134
+ */
135
+ export declare const updatePasskey: (options: UpdatePasskeyOptions,
136
+ /** @hidden */
137
+ logger?: typeof Logger.Service) => Promise<boolean | UpdateError>;
138
+ /**
139
+ * Attempts to delete a passkey from a local device. There are two scenarios in which this function proves useful:
140
+ *
141
+ * 1. **Deleting a passkey**. Use the `@passlock/node` package or make vanilla REST calls from your
142
+ * backend to delete the server-side component, then use this function to delete the client-side component.
143
+ *
144
+ * 2. **Missing passkey**. The user tried to present a passkey, but the server-side component could not be found.
145
+ * Remove the passkey from the local device to prevent it happening again.
146
+ *
147
+ * See [deleting passkeys](https://passlock.dev/passkeys/passkey-removal/) and
148
+ * [handling missing passkeys](https://passlock.dev/handling-missing-passkeys/) in the documentation.
149
+ *
150
+ * @param identifiers Passkey identifier, credential mapping, or a {@link PasskeyNotFoundError}
151
+ * payload from failed authentication.
152
+ * @param options Passlock tenancy and endpoint options.
153
+ * @returns Delete status
154
+ * @see {@link isDeleteError}
155
+ *
156
+ * @example
157
+ * // from your Passlock console settings
158
+ * const tenancyId = "myTenancyId";
159
+ * const passkeyId = "myPasskeyId";
160
+ *
161
+ * const result = await deletePasskey(passkeyId, { tenancyId });
162
+ *
163
+ * if (result === true) {
164
+ * console.log("passkey deleted locally");
165
+ * } else if (isDeleteError(result)) {
166
+ * // narrowed to a DeleteError type
167
+ * console.error(result.code);
168
+ * } else {
169
+ * console.error("unable to delete passkey");
170
+ * }
171
+ *
172
+ * @category Passkeys (core)
173
+ */
174
+ export declare const deletePasskey: (identifiers: string | CredentialMapping | PasskeyNotFoundError, options: PasslockOptions,
175
+ /** @hidden */
176
+ logger?: typeof Logger.Service) => Promise<boolean | DeleteError>;
177
+ /**
178
+ * Attempt to prune local passkeys by keeping only the passkey IDs you trust.
179
+ *
180
+ * This is useful when your backend is the source of truth for which passkeys
181
+ * should still exist for a given account on this device.
182
+ *
183
+ * @param passkeyIds IDs to keep on-device.
184
+ * @param options Passlock tenancy and endpoint options.
185
+ * @returns Pruning status
186
+ * @see {@link isPruningError}
187
+ *
188
+ * @example
189
+ * // from your Passlock console settings
190
+ * const tenancyId = "myTenancyId";
191
+ * const activePasskeyIds = ["passkey-1", "passkey-2"];
192
+ *
193
+ * const result = await prunePasskeys(activePasskeyIds, { tenancyId });
194
+ *
195
+ * if (result === true) {
196
+ * console.log("local passkeys pruned");
197
+ * } else if (isPruningError(result)) {
198
+ * // narrowed to a PruningError type
199
+ * console.error(result.code);
200
+ * } else {
201
+ * console.error("unable to prune passkeys");
202
+ * }
203
+ *
204
+ * @category Passkeys (core)
205
+ */
206
+ export declare const prunePasskeys: (passkeyIds: Array<string>, options: PasslockOptions,
207
+ /** @hidden */
208
+ logger?: typeof Logger.Service) => Promise<boolean | PruningError>;
209
+ /**
210
+ * Does the local device support programmatic passkey deletion
211
+ *
212
+ * @returns `true` if local passkey deletion is supported.
213
+ *
214
+ * @category Passkeys (other)
215
+ */
216
+ export declare const isPasskeyDeleteSupport: () => boolean;
217
+ /**
218
+ * Does the local device support programmatic passkey pruning
219
+ *
220
+ * @returns `true` if local passkey pruning is supported.
221
+ *
222
+ * @category Passkeys (other)
223
+ */
224
+ export declare const isPasskeyPruningSupport: () => boolean;
225
+ /**
226
+ * Does the local device support programmatic passkey updates
227
+ *
228
+ * @returns `true` if local passkey updates are supported.
229
+ *
230
+ * @category Passkeys (other)
231
+ */
232
+ export declare const isPasskeyUpdateSupport: () => boolean;
233
+ export type { NetworkError } from "./internal/network";
234
+ export { isNetworkError } from "./internal/network";
235
+ export { LogEvent, Logger, LogLevel, } from "./logger";
236
+ export type { PasslockOptions } from "./options";
237
+ export type { AuthenticationError, AuthenticationEvent, AuthenticationOptions, AuthenticationSuccess, OnAuthenticationEvent, } from "./passkey/authentication/authentication";
238
+ export { AuthenticationHelper, isAuthenticationSuccess, } from "./passkey/authentication/authentication";
239
+ export type { ErrorCode } from "./passkey/errors";
240
+ export { DeleteError, DuplicatePasskeyError, isDeleteError, isDuplicatePasskeyError, isOtherPasskeyError, isPasskeyNotFoundError, isPasskeyUnsupportedError, isPruningError, isUpdateError, OtherPasskeyError, PasskeyNotFoundError, PasskeyUnsupportedError, PruningError, UpdateError, } from "./passkey/errors";
241
+ export type { OnRegistrationEvent, RegistrationError, RegistrationEvent, RegistrationOptions, RegistrationSuccess, } from "./passkey/registration/registration";
242
+ export { isRegistrationSuccess, RegistrationHelper, } from "./passkey/registration/registration";
243
+ export type { UserVerification } from "./passkey/shared";
244
+ export type { CredentialMapping, UpdatePasskeyOptions, } from "./passkey/signals/signals";
245
+ export { isAutofillSupport, isPasskeySupport, } from "./passkey/support";
246
+ export type { Principal } from "./principal";
247
+ //# sourceMappingURL=safe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safe.d.ts","sourceRoot":"","sources":["../src/safe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,EAAe,MAAM,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,yCAAyC,CAAA;AAKhD,OAAO,KAAK,EACV,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACZ,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,qCAAqC,CAAA;AAM5C,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,2BAA2B,CAAA;AAalC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,eAAe,GAC1B,SAAS,mBAAmB;AAC5B,cAAc;AACd,SAAQ,OAAO,MAAM,CAAC,OAAqB,KAC1C,OAAO,CAAC,mBAAmB,GAAG,iBAAiB,CAM/C,C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AE,MAAM,WAAW,CAAA;AAChD,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,yCAAyC,CAAA;AAChD,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,yCAAyC,CAAA;AAChD,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EACL,WAAW,EACX,qBAAqB,EACrB,aAAa,EACb,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EACzB,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,YAAY,EACZ,WAAW,GACZ,MAAM,kBAAkB,CAAA;AACzB,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,qCAAqC,CAAA;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,YAAY,EACV,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA"}
package/dist/safe.js ADDED
@@ -0,0 +1,254 @@
1
+ /**
2
+ * _safe_ functions i.e. functions that do not throw but instead return discriminated union
3
+ * types composed of a successful result or an error. Use one of the type guards to narrow
4
+ * the result to a given success or error type.
5
+ *
6
+ * @categoryDescription Passkeys (core)
7
+ * Creating, updating, authenticating and deleting passkeys. {@link registerPasskey}
8
+ * and {@link authenticatePasskey} are the primary functions.
9
+ *
10
+ * @categoryDescription Passkeys (other)
11
+ * Testing for browser capabilities related to passkeys, type guards and other utilities.
12
+ *
13
+ * @categoryDescription Passkeys (errors)
14
+ * Errors that could be returned by a function.
15
+ *
16
+ * @showCategories
17
+ * @module safe
18
+ */
19
+ import { Micro, pipe } from "effect";
20
+ import { runToPromise } from "./internal";
21
+ import { eventLogger, Logger } from "./logger";
22
+ import { AuthenticationHelper, authenticatePasskey as authenticatePasskeyM, } from "./passkey/authentication/authentication";
23
+ import { RegistrationHelper, registerPasskey as registerPasskeyM, } from "./passkey/registration/registration";
24
+ import { deletePasskey as deletePasskeyM, isPasskeyDeleteSupport as isPasskeyDeleteSupportM, isPasskeyPruningSupport as isPasskeyPruningSupportM, isPasskeyUpdateSupport as isPasskeyUpdateSupportM, prunePasskeys as prunePasskeysM, signalCredentialRemoval, updatePasskey as updatePasskeyM, } from "./passkey/signals/signals";
25
+ /* Registration */
26
+ /**
27
+ * Registers a passkey on the user's device, then saves the server-side component in your vault.
28
+ * If successful, this function returns a `code` or `id_token` (JWT). The code and/or jwt should
29
+ * be sent to your backend for verification. See
30
+ * [register a passkey](https://passlock.dev/passkeys/registration/) in the documentation.
31
+ *
32
+ * @param options
33
+ *
34
+ * @returns Use {@link isRegistrationSuccess} to test for a successful result, `RegistrationError` is
35
+ * an alias to a union of potential errors. Use one of the appropriate isXXX type guards to narrow
36
+ * the error.
37
+ *
38
+ * @see {@link isRegistrationSuccess}
39
+ * @see {@link isPasskeyUnsupportedError}
40
+ * @see {@link isDuplicatePasskeyError}
41
+ * @see {@link isOtherPasskeyError}
42
+ *
43
+ * @example
44
+ * // from your Passlock console settings
45
+ * const tenancyId = "myTenancyId";
46
+ * const username = "jdoe@gmail.com";
47
+ *
48
+ * const result = await registerPasskey({ tenancyId, username });
49
+ *
50
+ * if (isRegistrationSuccess(result)) {
51
+ * // send this to your backend for verification
52
+ * console.log(result.code);
53
+ * } else if (isPasskeyUnsupportedError(result)) {
54
+ * console.error("Device does not support passkeys");
55
+ * } else {
56
+ * console.error(result.message);
57
+ * }
58
+ *
59
+ * @category Passkeys (core)
60
+ */
61
+ export const registerPasskey = async (options,
62
+ /** @hidden */
63
+ logger = eventLogger) => pipe(registerPasskeyM(options), Micro.provideService(RegistrationHelper, RegistrationHelper.Default), Micro.provideService(Logger, logger), runToPromise);
64
+ /* Authentication */
65
+ /**
66
+ * Asks the client to present a passkey, which is then verified against the server-side component in your vault.
67
+ * If successful, this function returns a `code` or `id_token` (JWT). The code and/or jwt should
68
+ * be sent to your backend for verification. See
69
+ * [authenticate a passkey](https://passlock.dev/passkeys/authentication/) in the documentation.
70
+ *
71
+ * @param options
72
+ *
73
+ * @returns Use {@link isAuthenticationSuccess} to test for a successful result, `AuthenticationError` is
74
+ * an alias to a union of potential errors. Use one of the appropriate isXXX type guards to narrow
75
+ * the error.
76
+ *
77
+ * @see {@link isAuthenticationSuccess}
78
+ * @see {@link isPasskeyUnsupportedError}
79
+ * @see {@link isPasskeyNotFoundError}
80
+ * @see {@link isOtherPasskeyError}
81
+ *
82
+ * @example
83
+ * // from your Passlock console settings
84
+ * const tenancyId = "myTenancyId";
85
+ *
86
+ * const result = await authenticatePasskey({ tenancyId });
87
+ *
88
+ * if (isAuthenticationSuccess(result)) {
89
+ * // send this to your backend for verification
90
+ * console.log(result.code);
91
+ * } else if (isPasskeyUnsupportedError(result)) {
92
+ * console.error("Device does not support passkeys");
93
+ * } else {
94
+ * console.error(result.message);
95
+ * }
96
+ *
97
+ * @category Passkeys (core)
98
+ */
99
+ export const authenticatePasskey = (options,
100
+ /** @hidden */
101
+ logger = eventLogger) => pipe(authenticatePasskeyM(options), Micro.provideService(AuthenticationHelper, AuthenticationHelper.Default), Micro.provideService(Logger, logger), runToPromise);
102
+ /* Signals */
103
+ /**
104
+ * Attempt to update the username or display name for a passkey (client-side only).
105
+ *
106
+ * Useful if the user has changed their account identifier. For example, they register
107
+ * using jdoe@gmail.com but later change their account username to jdoe@yahoo.com.
108
+ * Even after you update their account details in your backend, their local password
109
+ * manager will continue to display jdoe@gmail.com.
110
+ *
111
+ * By calling this function and supplying a new username/display name, their local
112
+ * password manager will align with their updated account identifier.
113
+ *
114
+ * @param options
115
+ * @returns Update status
116
+ * @see {@link isUpdateError}
117
+ *
118
+ * @example
119
+ * // from your Passlock console settings
120
+ * const tenancyId = "myTenancyId";
121
+ * const passkeyId = "myPasskeyId";
122
+ * const username = "newUsername@gmail.com";
123
+ * const displayName = "New Account Name";
124
+ *
125
+ * const result = await updatePasskey({ tenancyId, passkeyId, username, displayName });
126
+ *
127
+ * if (result === true) {
128
+ * console.log("passkey updated locally");
129
+ * } else if (isUpdateError(result)) {
130
+ * // narrowed to an UpdateError type
131
+ * console.error(result.code);
132
+ * } else {
133
+ * console.error("unable to update passkey");
134
+ * }
135
+ *
136
+ * @category Passkeys (core)
137
+ */
138
+ export const updatePasskey = (options,
139
+ /** @hidden */
140
+ logger = eventLogger) => {
141
+ const micro = updatePasskeyM(options);
142
+ return pipe(micro, Micro.provideService(Logger, logger), runToPromise);
143
+ };
144
+ /**
145
+ * Attempts to delete a passkey from a local device. There are two scenarios in which this function proves useful:
146
+ *
147
+ * 1. **Deleting a passkey**. Use the `@passlock/node` package or make vanilla REST calls from your
148
+ * backend to delete the server-side component, then use this function to delete the client-side component.
149
+ *
150
+ * 2. **Missing passkey**. The user tried to present a passkey, but the server-side component could not be found.
151
+ * Remove the passkey from the local device to prevent it happening again.
152
+ *
153
+ * See [deleting passkeys](https://passlock.dev/passkeys/passkey-removal/) and
154
+ * [handling missing passkeys](https://passlock.dev/handling-missing-passkeys/) in the documentation.
155
+ *
156
+ * @param identifiers Passkey identifier, credential mapping, or a {@link PasskeyNotFoundError}
157
+ * payload from failed authentication.
158
+ * @param options Passlock tenancy and endpoint options.
159
+ * @returns Delete status
160
+ * @see {@link isDeleteError}
161
+ *
162
+ * @example
163
+ * // from your Passlock console settings
164
+ * const tenancyId = "myTenancyId";
165
+ * const passkeyId = "myPasskeyId";
166
+ *
167
+ * const result = await deletePasskey(passkeyId, { tenancyId });
168
+ *
169
+ * if (result === true) {
170
+ * console.log("passkey deleted locally");
171
+ * } else if (isDeleteError(result)) {
172
+ * // narrowed to a DeleteError type
173
+ * console.error(result.code);
174
+ * } else {
175
+ * console.error("unable to delete passkey");
176
+ * }
177
+ *
178
+ * @category Passkeys (core)
179
+ */
180
+ export const deletePasskey = (identifiers, options,
181
+ /** @hidden */
182
+ logger = eventLogger) => {
183
+ const micro = typeof identifiers === "string"
184
+ ? deletePasskeyM(identifiers, options)
185
+ : signalCredentialRemoval(identifiers);
186
+ return pipe(micro, Micro.provideService(Logger, logger), runToPromise);
187
+ };
188
+ /**
189
+ * Attempt to prune local passkeys by keeping only the passkey IDs you trust.
190
+ *
191
+ * This is useful when your backend is the source of truth for which passkeys
192
+ * should still exist for a given account on this device.
193
+ *
194
+ * @param passkeyIds IDs to keep on-device.
195
+ * @param options Passlock tenancy and endpoint options.
196
+ * @returns Pruning status
197
+ * @see {@link isPruningError}
198
+ *
199
+ * @example
200
+ * // from your Passlock console settings
201
+ * const tenancyId = "myTenancyId";
202
+ * const activePasskeyIds = ["passkey-1", "passkey-2"];
203
+ *
204
+ * const result = await prunePasskeys(activePasskeyIds, { tenancyId });
205
+ *
206
+ * if (result === true) {
207
+ * console.log("local passkeys pruned");
208
+ * } else if (isPruningError(result)) {
209
+ * // narrowed to a PruningError type
210
+ * console.error(result.code);
211
+ * } else {
212
+ * console.error("unable to prune passkeys");
213
+ * }
214
+ *
215
+ * @category Passkeys (core)
216
+ */
217
+ export const prunePasskeys = (passkeyIds, options,
218
+ /** @hidden */
219
+ logger = eventLogger) => {
220
+ const micro = prunePasskeysM(passkeyIds, options);
221
+ return pipe(micro, Micro.provideService(Logger, logger), runToPromise);
222
+ };
223
+ /* Support */
224
+ /**
225
+ * Does the local device support programmatic passkey deletion
226
+ *
227
+ * @returns `true` if local passkey deletion is supported.
228
+ *
229
+ * @category Passkeys (other)
230
+ */
231
+ export const isPasskeyDeleteSupport = () => pipe(isPasskeyDeleteSupportM, Micro.runSync);
232
+ /**
233
+ * Does the local device support programmatic passkey pruning
234
+ *
235
+ * @returns `true` if local passkey pruning is supported.
236
+ *
237
+ * @category Passkeys (other)
238
+ */
239
+ export const isPasskeyPruningSupport = () => pipe(isPasskeyPruningSupportM, Micro.runSync);
240
+ /**
241
+ * Does the local device support programmatic passkey updates
242
+ *
243
+ * @returns `true` if local passkey updates are supported.
244
+ *
245
+ * @category Passkeys (other)
246
+ */
247
+ export const isPasskeyUpdateSupport = () => pipe(isPasskeyUpdateSupportM, Micro.runSync);
248
+ export { isNetworkError } from "./internal/network";
249
+ export { LogEvent, Logger, LogLevel, } from "./logger";
250
+ export { AuthenticationHelper, isAuthenticationSuccess, } from "./passkey/authentication/authentication";
251
+ export { DeleteError, DuplicatePasskeyError, isDeleteError, isDuplicatePasskeyError, isOtherPasskeyError, isPasskeyNotFoundError, isPasskeyUnsupportedError, isPruningError, isUpdateError, OtherPasskeyError, PasskeyNotFoundError, PasskeyUnsupportedError, PruningError, UpdateError, } from "./passkey/errors";
252
+ export { isRegistrationSuccess, RegistrationHelper, } from "./passkey/registration/registration";
253
+ export { isAutofillSupport, isPasskeySupport, } from "./passkey/support";
254
+ //# sourceMappingURL=safe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safe.js","sourceRoot":"","sources":["../src/safe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAO9C,OAAO,EACL,oBAAoB,EACpB,mBAAmB,IAAI,oBAAoB,GAC5C,MAAM,yCAAyC,CAAA;AAahD,OAAO,EACL,kBAAkB,EAClB,eAAe,IAAI,gBAAgB,GACpC,MAAM,qCAAqC,CAAA;AAM5C,OAAO,EACL,aAAa,IAAI,cAAc,EAC/B,sBAAsB,IAAI,uBAAuB,EACjD,uBAAuB,IAAI,wBAAwB,EACnD,sB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B,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,yCAAyC,CAAA;AAEhD,OAAO,EACL,WAAW,EACX,qBAAqB,EACrB,aAAa,EACb,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EACzB,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,YAAY,EACZ,WAAW,GACZ,MAAM,kBAAkB,CAAA;AAQzB,OAAO,EACL,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,qCAAqC,CAAA;AAM5C,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mBAAmB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@passlock/client",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Flexible passkey authentication for Astro, SvelteKit, NextJS and other frameworks",
5
5
  "keywords": [
6
6
  "passkey",
@@ -34,6 +34,11 @@
34
34
  "types": "./dist/index.d.ts",
35
35
  "import": "./dist/index.js",
36
36
  "default": "./dist/index.js"
37
+ },
38
+ "./safe": {
39
+ "types": "./dist/safe.d.ts",
40
+ "import": "./dist/safe.js",
41
+ "default": "./dist/safe.js"
37
42
  }
38
43
  },
39
44
  "module": "./dist/index.js",
@@ -43,39 +48,39 @@
43
48
  ],
44
49
  "dependencies": {
45
50
  "@simplewebauthn/browser": "^13.2.2",
46
- "effect": "3.19.14"
51
+ "effect": "3.19.19"
47
52
  },
48
53
  "devDependencies": {
49
- "@biomejs/biome": "^2.3.11",
50
- "@effect/language-service": "^0.72.0",
54
+ "@biomejs/biome": "^2.4.4",
55
+ "@effect/language-service": "^0.75.1",
51
56
  "@fetch-mock/vitest": "^0.2.18",
52
- "@typescript/lib-dom": "npm:@types/web@^0.0.320",
53
- "globals": "^17.0.0",
54
- "npm-check-updates": "^19.3.1",
57
+ "@typescript/lib-dom": "npm:@types/web@^0.0.337",
58
+ "globals": "^17.3.0",
59
+ "npm-check-updates": "^19.4.1",
55
60
  "publint": "0.3.17",
56
- "rimraf": "^6.1.2",
61
+ "rimraf": "^6.1.3",
57
62
  "tsx": "4.21.0",
63
+ "typedoc": "^0.28.17",
58
64
  "typescript": "^5.9.3",
59
65
  "vitest": "^4.0.16"
60
66
  },
61
67
  "peerDependencies": {
62
- "effect": "3.19.14"
68
+ "effect": "3.19.19"
63
69
  },
64
70
  "scripts": {
65
- "build": "tsc --build",
71
+ "build": "tsc -p tsconfig.build.json",
66
72
  "build:clean": "$npm_execpath run clean:full && $npm_execpath run build",
67
73
  "build:production": "$npm_execpath run build:clean && $npm_execpath run build:readme && $npm_execpath run replaceTokens && echo '' && publint",
68
- "build:readme": "LATEST=${npm_package_version} tsx ../../scripts/replace-readme-tokens.ts ./packages/client",
69
- "clean": "tsc --build --clean",
70
- "clean:full": "rimraf dist tsconfig.tsbuildinfo",
71
- "replaceTokens": "LATEST=${npm_package_version} tsx ../../scripts/replace-tokens.ts ./packages/client",
72
- "test": "vitest --project unit",
73
- "test:it": "vitest --project integration",
74
- "test:all": "vitest run --project unit --project integration",
75
- "test:coverage": "vitest run --coverage",
76
- "test:ui": "vitest --coverage.enabled=true --ui",
77
- "test:watch": "vitest dev",
78
- "typecheck": "tsc --noEmit",
74
+ "build:readme": "VERSION=${npm_package_version} tsx ../../scripts/replace-readme-tokens.ts ./packages/client",
75
+ "typedoc": "typedoc",
76
+ "clean": "tsc -p tsconfig.build.json --clean",
77
+ "clean:full": "rimraf dist tsconfig.build.tsbuildinfo",
78
+ "replaceTokens": "VERSION=${npm_package_version} tsx ../../scripts/replace-tokens.ts ./packages/client",
79
+ "test:unit": "vitest --project unit run",
80
+ "test:unit:watch": "vitest --project unit",
81
+ "test:integration": "vitest --project integration run",
82
+ "test:all": "vitest --project unit --project integration run",
83
+ "typecheck": "tsc -p tsconfig.test.json --noEmit",
79
84
  "lint": "biome check .",
80
85
  "lint:fix": "biome check --fix .",
81
86
  "lint:ci": "biome ci .",
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/logger/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;;uBAKhB,CAAC,OAAO,EAAE,MAAM,KAAK,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;sBACvC,CAAC,OAAO,EAAE,MAAM,KAAK,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;sBACtC,CAAC,OAAO,EAAE,MAAM,KAAK,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;uBACrC,CAAC,OAAO,EAAE,MAAM,KAAK,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;;AAN7D,qBAAa,MAAO,SAAQ,WAQzB;CAAG;AAEN,eAAO,MAAM,aAAa,EAAE,OAAO,MAAM,CAAC,OAoBzC,CAAA;AAED,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,qBAAa,QAAS,SAAQ,KAAK;;IAIjC,MAAM,CAAC,IAAI,SAAqB;gBAEpB,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ;IAM5C,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,IAAI,KAAK,IAAI,QAAQ,CAEpB;CACF;AASD,eAAO,MAAM,WAAW,EAAE,OAAO,MAAM,CAAC,OAKvC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/logger/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAEvC,MAAM,OAAO,MAAO,SAAQ,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAQ9C;CAAG;AAEN,MAAM,CAAC,MAAM,aAAa,GAA0B;IAClD,QAAQ,EAAE,CAAC,OAAwB,EAAE,GAAG,YAA4B,EAAE,EAAE,CACtE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AAI,CAAC,MAAM,CAAA;IACpB,CAAC;;AAGH,MAAM,QAAQ,GAAG,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC,OAAe,EAAE,EAAE,CACxD,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;IACd,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,CAAC,aAAa,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAA;IACpD,CAAC;AACH,CAAC,CAAC,CAAA;AAEJ,MAAM,CAAC,MAAM,WAAW,GAA0B;IAChD,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;IAClC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;IAClC,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;IAChC,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;CACjC,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=authentication.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authentication.test.d.ts","sourceRoot":"","sources":["../../../src/passkey/authentication/authentication.test.ts"],"names":[],"mappings":""}