@passlock/client 2.0.5 → 2.1.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.
package/dist/index.d.ts
CHANGED
|
@@ -140,7 +140,7 @@ logger?: typeof Logger.Service) => Promise<UpdateSuccess>;
|
|
|
140
140
|
/**
|
|
141
141
|
* Attempts to delete a passkey from a local device. There are two scenarios in which this function proves useful:
|
|
142
142
|
*
|
|
143
|
-
* 1. **Deleting a passkey**. Use the `@passlock/
|
|
143
|
+
* 1. **Deleting a passkey**. Use the `@passlock/server` package or make vanilla REST calls from your
|
|
144
144
|
* backend to delete the server-side component, then use this function to delete the client-side component.
|
|
145
145
|
*
|
|
146
146
|
* 2. **Missing passkey**. The user tried to present a passkey, but the server-side component could not be found.
|
package/dist/index.js
CHANGED
|
@@ -147,7 +147,7 @@ logger = eventLogger) => {
|
|
|
147
147
|
/**
|
|
148
148
|
* Attempts to delete a passkey from a local device. There are two scenarios in which this function proves useful:
|
|
149
149
|
*
|
|
150
|
-
* 1. **Deleting a passkey**. Use the `@passlock/
|
|
150
|
+
* 1. **Deleting a passkey**. Use the `@passlock/server` package or make vanilla REST calls from your
|
|
151
151
|
* backend to delete the server-side component, then use this function to delete the client-side component.
|
|
152
152
|
*
|
|
153
153
|
* 2. **Missing passkey**. The user tried to present a passkey, but the server-side component could not be found.
|
|
@@ -52,7 +52,7 @@ export type AuthenticationSuccessTag = typeof AuthenticationSuccessTag;
|
|
|
52
52
|
* Represents the outcome of a successful passkey authentication.
|
|
53
53
|
* Submit the `code` and/or `id_token` to your backend, then either
|
|
54
54
|
* exchange the code with the Passlock REST API or decode and
|
|
55
|
-
* verify the id_token (JWT). **note:** The @passlock/
|
|
55
|
+
* verify the id_token (JWT). **note:** The @passlock/server library
|
|
56
56
|
* includes utilities for this.
|
|
57
57
|
*
|
|
58
58
|
* @see {@link isAuthenticationSuccess}
|
|
@@ -67,7 +67,7 @@ export type AuthenticationSuccess = {
|
|
|
67
67
|
principal: Principal;
|
|
68
68
|
/**
|
|
69
69
|
* A signed JWT representing the authenticated passkey.
|
|
70
|
-
* Decode and verify this in your backend or use one of the @passlock/
|
|
70
|
+
* Decode and verify this in your backend or use one of the @passlock/server
|
|
71
71
|
* helper utilities.
|
|
72
72
|
*
|
|
73
73
|
* @see {@link https://passlock.dev/principal/idtoken-verification/|id_token}
|
|
@@ -62,7 +62,7 @@ export interface RegistrationOptions extends PasslockOptions {
|
|
|
62
62
|
* Represents the outcome of a successful passkey registration.
|
|
63
63
|
* Submit the `code` and/or `id_token` to your backend, then either
|
|
64
64
|
* exchange the code with the Passlock REST API or decode and
|
|
65
|
-
* verify the id_token (JWT). **note:** The @passlock/
|
|
65
|
+
* verify the id_token (JWT). **note:** The @passlock/server library
|
|
66
66
|
* includes utilities for this.
|
|
67
67
|
*
|
|
68
68
|
* @see {@link isRegistrationSuccess}
|
|
@@ -77,7 +77,7 @@ export type RegistrationSuccess = {
|
|
|
77
77
|
principal: Principal;
|
|
78
78
|
/**
|
|
79
79
|
* A signed JWT representing the newly registered passkey.
|
|
80
|
-
* Decode and verify this in your backend or use one of the @passlock/
|
|
80
|
+
* Decode and verify this in your backend or use one of the @passlock/server
|
|
81
81
|
* helper utilities.
|
|
82
82
|
*
|
|
83
83
|
* @see {@link https://passlock.dev/principal/idtoken-verification/|id_token}
|
package/dist/principal.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type Principal = {
|
|
|
11
11
|
authenticatorId: string;
|
|
12
12
|
/**
|
|
13
13
|
* By default this will mirror the `authenticatorId` however you
|
|
14
|
-
* can use the REST API or @passlock/
|
|
14
|
+
* can use the REST API or @passlock/server package to assign your
|
|
15
15
|
* own internal userId to the passkey.
|
|
16
16
|
*/
|
|
17
17
|
userId: string;
|
package/dist/safe.d.ts
CHANGED
|
@@ -154,7 +154,7 @@ logger?: typeof Logger.Service) => Promise<UpdateSuccess | UpdateError>;
|
|
|
154
154
|
/**
|
|
155
155
|
* Attempts to delete a passkey from a local device. There are two scenarios in which this function is useful:
|
|
156
156
|
*
|
|
157
|
-
* 1. **Deleting a passkey** - Use the `@passlock/
|
|
157
|
+
* 1. **Deleting a passkey** - Use the `@passlock/server` package or make vanilla REST calls from your
|
|
158
158
|
* backend to delete the server-side component, then use this function to delete the client-side component.
|
|
159
159
|
*
|
|
160
160
|
* 2. **Missing passkey** - When a user presented a passkey but the server-side component could not be found.
|
package/dist/safe.js
CHANGED
|
@@ -161,7 +161,7 @@ logger = eventLogger) => {
|
|
|
161
161
|
/**
|
|
162
162
|
* Attempts to delete a passkey from a local device. There are two scenarios in which this function is useful:
|
|
163
163
|
*
|
|
164
|
-
* 1. **Deleting a passkey** - Use the `@passlock/
|
|
164
|
+
* 1. **Deleting a passkey** - Use the `@passlock/server` package or make vanilla REST calls from your
|
|
165
165
|
* backend to delete the server-side component, then use this function to delete the client-side component.
|
|
166
166
|
*
|
|
167
167
|
* 2. **Missing passkey** - When a user presented a passkey but the server-side component could not be found.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@passlock/client",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Flexible passkey authentication for Astro, SvelteKit, NextJS and other frameworks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"passkey",
|
|
@@ -46,6 +46,24 @@
|
|
|
46
46
|
"files": [
|
|
47
47
|
"dist"
|
|
48
48
|
],
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@simplewebauthn/browser": "^13.2.2",
|
|
51
|
+
"effect": "3.19.19"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@biomejs/biome": "^2.4.6",
|
|
55
|
+
"@effect/language-service": "^0.78.0",
|
|
56
|
+
"@fetch-mock/vitest": "^0.2.18",
|
|
57
|
+
"@typescript/lib-dom": "npm:@types/web@^0.0.339",
|
|
58
|
+
"globals": "^17.4.0",
|
|
59
|
+
"npm-check-updates": "^19.6.3",
|
|
60
|
+
"publint": "0.3.18",
|
|
61
|
+
"rimraf": "^6.1.3",
|
|
62
|
+
"tsx": "4.21.0",
|
|
63
|
+
"typedoc": "^0.28.17",
|
|
64
|
+
"typescript": "^5.9.3",
|
|
65
|
+
"vitest": "^4.0.16"
|
|
66
|
+
},
|
|
49
67
|
"scripts": {
|
|
50
68
|
"build": "tsc -p tsconfig.build.json",
|
|
51
69
|
"build:clean": "$npm_execpath run clean:full && $npm_execpath run build",
|
|
@@ -54,7 +72,6 @@
|
|
|
54
72
|
"typedoc": "typedoc",
|
|
55
73
|
"clean": "tsc -p tsconfig.build.json --clean",
|
|
56
74
|
"clean:full": "rimraf dist tsconfig.build.tsbuildinfo",
|
|
57
|
-
"prepublishOnly": "$npm_execpath run build:production",
|
|
58
75
|
"replaceTokens": "VERSION=${npm_package_version} tsx ../../scripts/replace-tokens.ts ./packages/client",
|
|
59
76
|
"test:unit": "vitest --project unit run",
|
|
60
77
|
"test:unit:watch": "vitest --project unit",
|
|
@@ -66,24 +83,5 @@
|
|
|
66
83
|
"lint:ci": "biome ci .",
|
|
67
84
|
"format": "biome format --fix .",
|
|
68
85
|
"format:check": "biome format ."
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
"@simplewebauthn/browser": "^13.2.2",
|
|
72
|
-
"effect": "catalog:"
|
|
73
|
-
},
|
|
74
|
-
"devDependencies": {
|
|
75
|
-
"@biomejs/biome": "catalog:",
|
|
76
|
-
"@effect/language-service": "^0.77.0",
|
|
77
|
-
"@fetch-mock/vitest": "^0.2.18",
|
|
78
|
-
"@typescript/lib-dom": "npm:@types/web@^0.0.339",
|
|
79
|
-
"globals": "catalog:",
|
|
80
|
-
"npm-check-updates": "catalog:",
|
|
81
|
-
"publint": "catalog:",
|
|
82
|
-
"rimraf": "catalog:",
|
|
83
|
-
"tsx": "catalog:",
|
|
84
|
-
"typedoc": "^0.28.17",
|
|
85
|
-
"typescript": "catalog:",
|
|
86
|
-
"vitest": "^4.0.16"
|
|
87
|
-
},
|
|
88
|
-
"packageManager": "pnpm@10.30.3"
|
|
89
|
-
}
|
|
86
|
+
}
|
|
87
|
+
}
|