@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/README.md CHANGED
@@ -16,7 +16,7 @@ in README.template.md and outputs to README.md
16
16
  <img align="center" width=550 height=50 src="https://passlock-assets.b-cdn.net/images/client-repo-banner.svg" />
17
17
  </picture>
18
18
  <p align="center">
19
- Next generation passkey authentication for Astro, Svelte(kit), Angular and other frameworks.
19
+ Next generation passkey authentication for Astro, Sveltekit, Angular and other frameworks.
20
20
  <br />
21
21
  <a href="https://passlock.dev"><strong>Project website »</strong></a>
22
22
  <br />
@@ -32,27 +32,25 @@ in README.template.md and outputs to README.md
32
32
 
33
33
  <br />
34
34
 
35
- ## Features
35
+ ## Key Features
36
36
 
37
- Passkeys and the WebAuthn API are quite complex. We've tried to simplify things for you, whilst still offering you the power and flexibility of the underlying APIs.
37
+ Powerful features including signals and related origin requests...
38
38
 
39
- 1. **💪 Powerful** - We expose the full WebAuthn/Passkey featureset including user verification, autofil, backup/sync and more
39
+ 1. **🔓 No lock-in**
40
+ Framework agnostic. Standards compliant.
40
41
 
41
- 2. **🫆 Biometrics** - Passlock allows you to add biometric authentication to your webapps
42
+ 2. **🔑 Related origins (domain migration)**
43
+ Accept passkeys from other domains on your site (subject to security constraints).
42
44
 
43
- 3. **👌 Headless components** - Giving you 100% control over the UI
45
+ 3. **🚀 Zero config passkeys**
46
+ Works out of the box with sensible defaults.
44
47
 
45
- 4. **🧰 Framework agnostic** - Passlock works with all major frontend & backend frameworks
48
+ 4. **📱 Credential management**
49
+ Programmatically manage passkeys on end user devices
46
50
 
47
- 5. **👩‍💻 Dev console** - Something not working? check the unified client/server dev console
48
-
49
- 6. **🖥️ Management console** - Suspend or revoke access for users, passkeys and more..
50
-
51
- 7. **🕵️‍♂️ Audit trail** - View a full audit trail for each passkey and user
51
+ 5. **💪 Powerful**
52
+ User verification, autofill, roaming authenticators and more.
52
53
 
53
54
  ## More information
54
55
 
55
- Please see the [tutorial](https://passlock.dev/getting-started/) and [documentation](https://passlock.dev)
56
-
57
- [contact]: https://passlock.dev/contact
58
- [node]: https://www.npmjs.com/package/@passlock/node
56
+ Please see the [tutorial](https://passlock.dev/getting-started/) and [documentation](https://passlock.dev)
@@ -16,7 +16,7 @@ in README.template.md and outputs to README.md
16
16
  <img align="center" width=550 height=50 src="#{ASSETS}#/images/client-repo-banner.svg" />
17
17
  </picture>
18
18
  <p align="center">
19
- Next generation passkey authentication for Astro, Svelte(kit), Angular and other frameworks.
19
+ Next generation passkey authentication for Astro, Sveltekit, Angular and other frameworks.
20
20
  <br />
21
21
  <a href="#{PASSLOCK_SITE}#"><strong>Project website »</strong></a>
22
22
  <br />
@@ -32,27 +32,25 @@ in README.template.md and outputs to README.md
32
32
 
33
33
  <br />
34
34
 
35
- ## Features
35
+ ## Key Features
36
36
 
37
- Passkeys and the WebAuthn API are quite complex. We've tried to simplify things for you, whilst still offering you the power and flexibility of the underlying APIs.
37
+ Powerful features including signals and related origin requests...
38
38
 
39
- 1. **💪 Powerful** - We expose the full WebAuthn/Passkey featureset including user verification, autofil, backup/sync and more
39
+ 1. **🔓 No lock-in**
40
+ Framework agnostic. Standards compliant.
40
41
 
41
- 2. **🫆 Biometrics** - Passlock allows you to add biometric authentication to your webapps
42
+ 2. **🔑 Related origins (domain migration)**
43
+ Accept passkeys from other domains on your site (subject to security constraints).
42
44
 
43
- 3. **👌 Headless components** - Giving you 100% control over the UI
45
+ 3. **🚀 Zero config passkeys**
46
+ Works out of the box with sensible defaults.
44
47
 
45
- 4. **🧰 Framework agnostic** - Passlock works with all major frontend & backend frameworks
48
+ 4. **📱 Credential management**
49
+ Programmatically manage passkeys on end user devices
46
50
 
47
- 5. **👩‍💻 Dev console** - Something not working? check the unified client/server dev console
48
-
49
- 6. **🖥️ Management console** - Suspend or revoke access for users, passkeys and more..
50
-
51
- 7. **🕵️‍♂️ Audit trail** - View a full audit trail for each passkey and user
51
+ 5. **💪 Powerful**
52
+ User verification, autofill, roaming authenticators and more.
52
53
 
53
54
  ## More information
54
55
 
55
- Please see the [tutorial](#{TUTORIAL}#) and [documentation](#{DOCS}#)
56
-
57
- [contact]: https://passlock.dev/contact
58
- [node]: https://www.npmjs.com/package/@passlock/node
56
+ Please see the [tutorial](#{TUTORIAL}#) and [documentation](#{DOCS}#)
@@ -0,0 +1,4 @@
1
+ export declare const isTagged: <A extends {
2
+ _tag: string;
3
+ }>(tag: A["_tag"]) => (payload: unknown) => payload is A;
4
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAClB,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,MAC1C,SAAS,OAAO,KAAG,OAAO,IAAI,CAS9B,CAAA"}
package/dist/errors.js ADDED
@@ -0,0 +1,14 @@
1
+ export const isTagged = (tag) => (payload) => {
2
+ if (typeof payload !== "object")
3
+ return false;
4
+ if (payload === null)
5
+ return false;
6
+ if (!("_tag" in payload))
7
+ return false;
8
+ if (typeof payload._tag !== "string")
9
+ return false;
10
+ if (payload._tag !== tag)
11
+ return false;
12
+ return true;
13
+ };
14
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GACnB,CAA6B,GAAc,EAAE,EAAE,CAC/C,CAAC,OAAgB,EAAgB,EAAE;IACjC,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAC7C,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,KAAK,CAAA;IAElC,IAAI,CAAC,CAAC,MAAM,IAAI,OAAO,CAAC;QAAE,OAAO,KAAK,CAAA;IACtC,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAClD,IAAI,OAAO,CAAC,IAAI,KAAK,GAAG;QAAE,OAAO,KAAK,CAAA;IAEtC,OAAO,IAAI,CAAA;AACb,CAAC,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,246 @@
1
- export type { PasslockOptions } from "./shared/options";
2
- export * from "./logger/index";
3
- export * from "./passkey/index";
4
- export { isUnexpectedError, UnexpectedError } from "./shared/network";
1
+ /**
2
+ * _unsafe_ functions that could throw an error. Be sure to catch errors and use one of the
3
+ * type guards to narrow the thrown error down to a specific type.
4
+ *
5
+ * @categoryDescription Passkeys (core)
6
+ * Creating, updating, authenticating and deleting passkeys.
7
+ *
8
+ * @categoryDescription Passkeys (other)
9
+ * Testing for browser capabilities related to passkeys, type guards and other utilities.
10
+ *
11
+ * @showCategories
12
+ * @module unsafe
13
+ */
14
+ import { Logger } from "./logger";
15
+ import type { PasslockOptions } from "./options";
16
+ import type { AuthenticationOptions, AuthenticationSuccess } from "./passkey/authentication/authentication";
17
+ import type { RegistrationOptions, RegistrationSuccess } from "./passkey/registration/registration";
18
+ import type { CredentialMapping, UpdatePasskeyOptions } from "./passkey/signals/signals";
19
+ /**
20
+ * Registers a passkey on the user's device, then saves the server-side component in your vault.
21
+ * If successful, this function returns a `code` or `id_token` (JWT). The code and/or jwt should
22
+ * be sent to your backend for verification. See
23
+ * [register a passkey](https://passlock.dev/passkeys/registration/) in the documentation.
24
+ *
25
+ * @param options
26
+ *
27
+ * @returns A successful registration payload.
28
+ *
29
+ * @see {@link isRegistrationSuccess}
30
+ * @see {@link isPasskeyUnsupportedError}
31
+ * @see {@link isDuplicatePasskeyError}
32
+ * @see {@link isOtherPasskeyError}
33
+ *
34
+ * @throws {@link RegistrationError} (alias to a union of potential errors)
35
+ * @throws {@link PasskeyUnsupportedError} if the device does not support passkeys
36
+ * @throws {@link DuplicatePasskeyError} if `allowCredentials` includes a passkey that already exists on the device
37
+ * @throws {@link OtherPasskeyError} typically a low level failure
38
+ * @throws {@link NetworkError}
39
+ *
40
+ * @example
41
+ * // from your Passlock console settings
42
+ * const tenancyId = "myTenancyId";
43
+ * const username = "jdoe@gmail.com";
44
+ *
45
+ * try {
46
+ * const result = await registerPasskey({ tenancyId, username });
47
+ * // send this to your backend for verification
48
+ * console.log(result.code);
49
+ * } catch (error) {
50
+ * if (isPasskeyUnsupportedError(error)) {
51
+ * alert("passkeys not supported on this device");
52
+ * } else {
53
+ * console.error(error);
54
+ * }
55
+ * }
56
+ *
57
+ * @category Passkeys (core)
58
+ */
59
+ export declare const registerPasskey: (options: RegistrationOptions,
60
+ /** @hidden */
61
+ logger?: typeof Logger.Service) => Promise<RegistrationSuccess>;
62
+ /**
63
+ * Asks the client to present a passkey, which is then verified against the server-side component in your vault.
64
+ * If successful, this function returns a `code` or `id_token` (JWT). The code and/or jwt should
65
+ * be sent to your backend for verification. See
66
+ * [authenticate a passkey](https://passlock.dev/passkeys/authentication/) in the documentation.
67
+ *
68
+ * @param options
69
+ *
70
+ * @returns A successful authentication payload.
71
+ *
72
+ * @see {@link isAuthenticationSuccess}
73
+ * @see {@link isPasskeyUnsupportedError}
74
+ * @see {@link isPasskeyNotFoundError}
75
+ * @see {@link isOtherPasskeyError}
76
+ *
77
+ * @throws {@link AuthenticationError} (alias to a union of potential errors)
78
+ * @throws {@link PasskeyUnsupportedError} if the device does not support passkeys
79
+ * @throws {@link PasskeyNotFoundError} if the passkey is orhpaned i.e. deleted from the vault but still present on the local device
80
+ * @throws {@link OtherPasskeyError} typically a low level failure
81
+ * @throws {@link NetworkError}
82
+ *
83
+ * @example
84
+ * // from your Passlock console settings
85
+ * const tenancyId = "myTenancyId";
86
+ *
87
+ * try {
88
+ * const result = await authenticatePasskey({ tenancyId });
89
+ * // send this to your backend for verification
90
+ * console.log(result.code);
91
+ * } catch (error) {
92
+ * if (isPasskeyUnsupportedError(error)) {
93
+ * alert("passkeys not supported on this device");
94
+ * } else {
95
+ * console.error(error);
96
+ * }
97
+ * }
98
+ *
99
+ * @category Passkeys (core)
100
+ */
101
+ export declare const authenticatePasskey: (options: AuthenticationOptions,
102
+ /** @hidden */
103
+ logger?: typeof Logger.Service) => Promise<AuthenticationSuccess>;
104
+ /**
105
+ * Attempt to update the username or display name for a passkey (client-side only).
106
+ *
107
+ * Useful if the user has changed their account identifier. For example, they register
108
+ * using jdoe@gmail.com but later change their account username to jdoe@yahoo.com.
109
+ * Even after you update their account details in your backend, their local password
110
+ * manager will continue to display jdoe@gmail.com.
111
+ *
112
+ * By calling this function and supplying a new username/display name, their local
113
+ * password manager will align with their updated account identifier.
114
+ *
115
+ * @param options
116
+ * @returns Update status
117
+ * @see {@link isUpdateError}
118
+ * @throws {@link UpdateError} if the passkey cannot be updated
119
+ *
120
+ * @example
121
+ * // from your Passlock console settings
122
+ * const tenancyId = "myTenancyId";
123
+ * const passkeyId = "myPasskeyId";
124
+ * const username = "newUsername@gmail.com";
125
+ * const displayName = "New Account Name";
126
+ *
127
+ * try {
128
+ * const result = await updatePasskey({ tenancyId, passkeyId, username, displayName });
129
+ * console.log("passkey updated");
130
+ * } catch (error) {
131
+ * console.error(error);
132
+ * }
133
+ *
134
+ * @category Passkeys (core)
135
+ */
136
+ export declare const updatePasskey: (options: UpdatePasskeyOptions,
137
+ /** @hidden */
138
+ logger?: typeof Logger.Service) => Promise<boolean>;
139
+ /**
140
+ * Attempts to delete a passkey from a local device. There are two scenarios in which this function proves useful:
141
+ *
142
+ * 1. **Deleting a passkey**. Use the `@passlock/node` package or make vanilla REST calls from your
143
+ * backend to delete the server-side component, then use this function to delete the client-side component.
144
+ *
145
+ * 2. **Missing passkey**. The user tried to present a passkey, but the server-side component could not be found.
146
+ * Remove the passkey from the local device to prevent it happening again.
147
+ *
148
+ * See [deleting passkeys](https://passlock.dev/passkeys/passkey-removal/) and
149
+ * [handling missing passkeys](https://passlock.dev/handling-missing-passkeys/) in the documentation.
150
+ *
151
+ * @param identifiers Passkey identifier or credential mapping.
152
+ * @param options Passlock tenancy and endpoint options.
153
+ * @returns Delete status
154
+ * @see {@link isDeleteError}
155
+ * @throws {@link DeleteError} if the passkey cannot be deleted
156
+ *
157
+ * @example
158
+ * // from your Passlock console settings
159
+ * const tenancyId = "myTenancyId";
160
+ * const passkeyId = "myPasskeyId";
161
+ *
162
+ * try {
163
+ * const result = await deletePasskey(passkeyId, { tenancyId });
164
+ * console.log("passkey deleted");
165
+ * } catch (error) {
166
+ * console.error(error);
167
+ * }
168
+ *
169
+ * @category Passkeys (core)
170
+ */
171
+ export declare const deletePasskey: (identifiers: string | CredentialMapping, options: PasslockOptions,
172
+ /** @hidden */
173
+ logger?: typeof Logger.Service) => Promise<boolean>;
174
+ /**
175
+ * Attempt to prune local passkeys by keeping only the passkey IDs you trust.
176
+ *
177
+ * This is useful when your backend is the source of truth for which passkeys
178
+ * should still exist for a given account on this device.
179
+ *
180
+ * @param passkeyIds IDs to keep on-device.
181
+ * @param options Passlock tenancy and endpoint options.
182
+ * @returns `true` if local passkeys were pruned.
183
+ * @see {@link isPruningError}
184
+ *
185
+ * @throws {@link PruningError}
186
+ *
187
+ * @example
188
+ * // from your Passlock console settings
189
+ * const tenancyId = "myTenancyId";
190
+ * const activePasskeyIds = ["passkey-1", "passkey-2"];
191
+ *
192
+ * try {
193
+ * const result = await prunePasskeys(activePasskeyIds, { tenancyId });
194
+ * console.log("local passkeys pruned", result);
195
+ * } catch (error) {
196
+ * if (isPruningError(error)) {
197
+ * console.error(error.code);
198
+ * } else {
199
+ * console.error(error);
200
+ * }
201
+ * }
202
+ *
203
+ * @category Passkeys (core)
204
+ */
205
+ export declare const prunePasskeys: (passkeyIds: Array<string>, options: PasslockOptions,
206
+ /** @hidden */
207
+ logger?: typeof Logger.Service) => Promise<boolean>;
208
+ /**
209
+ * Does the local device support programmatic passkey deletion
210
+ *
211
+ * @returns `true` if local passkey deletion is supported.
212
+ *
213
+ * @category Passkeys (other)
214
+ */
215
+ export declare const isPasskeyDeleteSupport: () => boolean;
216
+ /**
217
+ * Does the local device support programmatic passkey pruning
218
+ *
219
+ * @returns `true` if local passkey pruning is supported.
220
+ *
221
+ * @category Passkeys (other)
222
+ */
223
+ export declare const isPasskeyPruningSupport: () => boolean;
224
+ /**
225
+ * Does the local device support programmatic passkey updates
226
+ *
227
+ * @returns `true` if local passkey updates are supported.
228
+ *
229
+ * @category Passkeys (other)
230
+ */
231
+ export declare const isPasskeyUpdateSupport: () => boolean;
232
+ export type { NetworkError } from "./internal/network";
233
+ export { isNetworkError } from "./internal/network";
234
+ export { LogEvent, Logger, LogLevel, } from "./logger";
235
+ export type { PasslockOptions } from "./options";
236
+ export type { AuthenticationError, AuthenticationEvent, AuthenticationOptions, AuthenticationSuccess, OnAuthenticationEvent, } from "./passkey/authentication/authentication";
237
+ export { AuthenticationHelper, isAuthenticationSuccess, } from "./passkey/authentication/authentication";
238
+ export type { ErrorCode } from "./passkey/errors";
239
+ export { DeleteError, DuplicatePasskeyError, isDeleteError, isDuplicatePasskeyError, isOtherPasskeyError, isPasskeyNotFoundError, isPasskeyUnsupportedError, isPruningError, isUpdateError, OtherPasskeyError, PasskeyNotFoundError, PasskeyUnsupportedError, PruningError, UpdateError, } from "./passkey/errors";
240
+ export type { OnRegistrationEvent, RegistrationError, RegistrationEvent, RegistrationOptions, RegistrationSuccess, } from "./passkey/registration/registration";
241
+ export { isRegistrationSuccess, RegistrationHelper, } from "./passkey/registration/registration";
242
+ export type { UserVerification } from "./passkey/shared";
243
+ export type { CredentialMapping, UpdatePasskeyOptions, } from "./passkey/signals/signals";
244
+ export { isAutofillSupport, isPasskeySupport, } from "./passkey/support";
245
+ export type { Principal } from "./principal";
5
246
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAe,MAAM,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,yCAAyC,CAAA;AAKhD,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,qCAAqC,CAAA;AAK5C,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,2BAA2B,CAAA;AAalC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,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ACT,MAAM,UAAU,CAAA;AACjB,YAAY,EAAE,eAAe,EAAE,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/index.js CHANGED
@@ -1,4 +1,254 @@
1
- export * from "./logger/index";
2
- export * from "./passkey/index";
3
- export { isUnexpectedError, UnexpectedError } from "./shared/network";
1
+ /**
2
+ * _unsafe_ functions that could throw an error. Be sure to catch errors and use one of the
3
+ * type guards to narrow the thrown error down to a specific type.
4
+ *
5
+ * @categoryDescription Passkeys (core)
6
+ * Creating, updating, authenticating and deleting passkeys.
7
+ *
8
+ * @categoryDescription Passkeys (other)
9
+ * Testing for browser capabilities related to passkeys, type guards and other utilities.
10
+ *
11
+ * @showCategories
12
+ * @module unsafe
13
+ */
14
+ import { Micro, pipe } from "effect";
15
+ import { runToPromiseUnsafe } from "./internal";
16
+ import { eventLogger, Logger } from "./logger";
17
+ import { AuthenticationHelper, authenticatePasskey as authenticatePasskeyM, } from "./passkey/authentication/authentication";
18
+ import { RegistrationHelper, registerPasskey as registerPasskeyM, } from "./passkey/registration/registration";
19
+ import { deletePasskey as deletePasskeyM, isPasskeyDeleteSupport as isPasskeyDeleteSupportM, isPasskeyPruningSupport as isPasskeyPruningSupportM, isPasskeyUpdateSupport as isPasskeyUpdateSupportM, prunePasskeys as prunePasskeysM, signalCredentialRemoval, updatePasskey as updatePasskeyM, } from "./passkey/signals/signals";
20
+ /* Registration */
21
+ /**
22
+ * Registers a passkey on the user's device, then saves the server-side component in your vault.
23
+ * If successful, this function returns a `code` or `id_token` (JWT). The code and/or jwt should
24
+ * be sent to your backend for verification. See
25
+ * [register a passkey](https://passlock.dev/passkeys/registration/) in the documentation.
26
+ *
27
+ * @param options
28
+ *
29
+ * @returns A successful registration payload.
30
+ *
31
+ * @see {@link isRegistrationSuccess}
32
+ * @see {@link isPasskeyUnsupportedError}
33
+ * @see {@link isDuplicatePasskeyError}
34
+ * @see {@link isOtherPasskeyError}
35
+ *
36
+ * @throws {@link RegistrationError} (alias to a union of potential errors)
37
+ * @throws {@link PasskeyUnsupportedError} if the device does not support passkeys
38
+ * @throws {@link DuplicatePasskeyError} if `allowCredentials` includes a passkey that already exists on the device
39
+ * @throws {@link OtherPasskeyError} typically a low level failure
40
+ * @throws {@link NetworkError}
41
+ *
42
+ * @example
43
+ * // from your Passlock console settings
44
+ * const tenancyId = "myTenancyId";
45
+ * const username = "jdoe@gmail.com";
46
+ *
47
+ * try {
48
+ * const result = await registerPasskey({ tenancyId, username });
49
+ * // send this to your backend for verification
50
+ * console.log(result.code);
51
+ * } catch (error) {
52
+ * if (isPasskeyUnsupportedError(error)) {
53
+ * alert("passkeys not supported on this device");
54
+ * } else {
55
+ * console.error(error);
56
+ * }
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), runToPromiseUnsafe);
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 A successful authentication payload.
74
+ *
75
+ * @see {@link isAuthenticationSuccess}
76
+ * @see {@link isPasskeyUnsupportedError}
77
+ * @see {@link isPasskeyNotFoundError}
78
+ * @see {@link isOtherPasskeyError}
79
+ *
80
+ * @throws {@link AuthenticationError} (alias to a union of potential errors)
81
+ * @throws {@link PasskeyUnsupportedError} if the device does not support passkeys
82
+ * @throws {@link PasskeyNotFoundError} if the passkey is orhpaned i.e. deleted from the vault but still present on the local device
83
+ * @throws {@link OtherPasskeyError} typically a low level failure
84
+ * @throws {@link NetworkError}
85
+ *
86
+ * @example
87
+ * // from your Passlock console settings
88
+ * const tenancyId = "myTenancyId";
89
+ *
90
+ * try {
91
+ * const result = await authenticatePasskey({ tenancyId });
92
+ * // send this to your backend for verification
93
+ * console.log(result.code);
94
+ * } catch (error) {
95
+ * if (isPasskeyUnsupportedError(error)) {
96
+ * alert("passkeys not supported on this device");
97
+ * } else {
98
+ * console.error(error);
99
+ * }
100
+ * }
101
+ *
102
+ * @category Passkeys (core)
103
+ */
104
+ export const authenticatePasskey = (options,
105
+ /** @hidden */
106
+ logger = eventLogger) => pipe(authenticatePasskeyM(options), Micro.provideService(AuthenticationHelper, AuthenticationHelper.Default), Micro.provideService(Logger, logger), runToPromiseUnsafe);
107
+ /* Signals */
108
+ /**
109
+ * Attempt to update the username or display name for a passkey (client-side only).
110
+ *
111
+ * Useful if the user has changed their account identifier. For example, they register
112
+ * using jdoe@gmail.com but later change their account username to jdoe@yahoo.com.
113
+ * Even after you update their account details in your backend, their local password
114
+ * manager will continue to display jdoe@gmail.com.
115
+ *
116
+ * By calling this function and supplying a new username/display name, their local
117
+ * password manager will align with their updated account identifier.
118
+ *
119
+ * @param options
120
+ * @returns Update status
121
+ * @see {@link isUpdateError}
122
+ * @throws {@link UpdateError} if the passkey cannot be updated
123
+ *
124
+ * @example
125
+ * // from your Passlock console settings
126
+ * const tenancyId = "myTenancyId";
127
+ * const passkeyId = "myPasskeyId";
128
+ * const username = "newUsername@gmail.com";
129
+ * const displayName = "New Account Name";
130
+ *
131
+ * try {
132
+ * const result = await updatePasskey({ tenancyId, passkeyId, username, displayName });
133
+ * console.log("passkey updated");
134
+ * } catch (error) {
135
+ * console.error(error);
136
+ * }
137
+ *
138
+ * @category Passkeys (core)
139
+ */
140
+ export const updatePasskey = (options,
141
+ /** @hidden */
142
+ logger = eventLogger) => {
143
+ const micro = updatePasskeyM(options);
144
+ return pipe(micro, Micro.provideService(Logger, logger), runToPromiseUnsafe);
145
+ };
146
+ /**
147
+ * Attempts to delete a passkey from a local device. There are two scenarios in which this function proves useful:
148
+ *
149
+ * 1. **Deleting a passkey**. Use the `@passlock/node` package or make vanilla REST calls from your
150
+ * backend to delete the server-side component, then use this function to delete the client-side component.
151
+ *
152
+ * 2. **Missing passkey**. The user tried to present a passkey, but the server-side component could not be found.
153
+ * Remove the passkey from the local device to prevent it happening again.
154
+ *
155
+ * See [deleting passkeys](https://passlock.dev/passkeys/passkey-removal/) and
156
+ * [handling missing passkeys](https://passlock.dev/handling-missing-passkeys/) in the documentation.
157
+ *
158
+ * @param identifiers Passkey identifier or credential mapping.
159
+ * @param options Passlock tenancy and endpoint options.
160
+ * @returns Delete status
161
+ * @see {@link isDeleteError}
162
+ * @throws {@link DeleteError} if the passkey cannot be deleted
163
+ *
164
+ * @example
165
+ * // from your Passlock console settings
166
+ * const tenancyId = "myTenancyId";
167
+ * const passkeyId = "myPasskeyId";
168
+ *
169
+ * try {
170
+ * const result = await deletePasskey(passkeyId, { tenancyId });
171
+ * console.log("passkey deleted");
172
+ * } catch (error) {
173
+ * console.error(error);
174
+ * }
175
+ *
176
+ * @category Passkeys (core)
177
+ */
178
+ export const deletePasskey = (identifiers, options,
179
+ /** @hidden */
180
+ logger = eventLogger) => {
181
+ const micro = typeof identifiers === "string"
182
+ ? deletePasskeyM(identifiers, options)
183
+ : signalCredentialRemoval(identifiers);
184
+ return pipe(micro, Micro.provideService(Logger, logger), runToPromiseUnsafe);
185
+ };
186
+ /**
187
+ * Attempt to prune local passkeys by keeping only the passkey IDs you trust.
188
+ *
189
+ * This is useful when your backend is the source of truth for which passkeys
190
+ * should still exist for a given account on this device.
191
+ *
192
+ * @param passkeyIds IDs to keep on-device.
193
+ * @param options Passlock tenancy and endpoint options.
194
+ * @returns `true` if local passkeys were pruned.
195
+ * @see {@link isPruningError}
196
+ *
197
+ * @throws {@link PruningError}
198
+ *
199
+ * @example
200
+ * // from your Passlock console settings
201
+ * const tenancyId = "myTenancyId";
202
+ * const activePasskeyIds = ["passkey-1", "passkey-2"];
203
+ *
204
+ * try {
205
+ * const result = await prunePasskeys(activePasskeyIds, { tenancyId });
206
+ * console.log("local passkeys pruned", result);
207
+ * } catch (error) {
208
+ * if (isPruningError(error)) {
209
+ * console.error(error.code);
210
+ * } else {
211
+ * console.error(error);
212
+ * }
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), runToPromiseUnsafe);
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";
4
254
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAA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ACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE,CAC1C,IAAI,CAAC,wBAAwB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;AAE/C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,EAAE,CACzC,IAAI,CAAC,uBAAuB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;AAK9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,GACT,MAAM,UAAU,CAAA;AASjB,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"}
@@ -0,0 +1,4 @@
1
+ export * from "./network";
2
+ export * from "./promise";
3
+ export * from "./tenancy";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA"}