@better-auth/passkey 1.4.2-beta.5 → 1.4.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.
package/dist/client.d.mts
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Passkey, r as PasskeyOptions, t as passkey } from "./index-
|
|
1
|
+
import { n as Passkey, r as PasskeyOptions, t as passkey } from "./index-BosVYrMJ.mjs";
|
|
2
2
|
export { Passkey, PasskeyOptions, passkey };
|
package/dist/index.mjs
CHANGED
|
@@ -102,82 +102,85 @@ const passkey = (options) => {
|
|
|
102
102
|
authenticatorAttachment: z.enum(["platform", "cross-platform"]).optional(),
|
|
103
103
|
name: z.string().optional()
|
|
104
104
|
}).optional(),
|
|
105
|
-
metadata: {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
description: "
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
105
|
+
metadata: {
|
|
106
|
+
client: false,
|
|
107
|
+
openapi: {
|
|
108
|
+
operationId: "generatePasskeyRegistrationOptions",
|
|
109
|
+
description: "Generate registration options for a new passkey",
|
|
110
|
+
responses: { 200: {
|
|
111
|
+
description: "Success",
|
|
112
|
+
parameters: { query: {
|
|
113
|
+
authenticatorAttachment: {
|
|
114
|
+
description: `Type of authenticator to use for registration.
|
|
113
115
|
"platform" for device-specific authenticators,
|
|
114
116
|
"cross-platform" for authenticators that can be used across devices.`,
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
name: {
|
|
118
|
-
description: `Optional custom name for the passkey.
|
|
119
|
-
This can help identify the passkey when managing multiple credentials.`,
|
|
120
|
-
required: false
|
|
121
|
-
}
|
|
122
|
-
} },
|
|
123
|
-
content: { "application/json": { schema: {
|
|
124
|
-
type: "object",
|
|
125
|
-
properties: {
|
|
126
|
-
challenge: { type: "string" },
|
|
127
|
-
rp: {
|
|
128
|
-
type: "object",
|
|
129
|
-
properties: {
|
|
130
|
-
name: { type: "string" },
|
|
131
|
-
id: { type: "string" }
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
user: {
|
|
135
|
-
type: "object",
|
|
136
|
-
properties: {
|
|
137
|
-
id: { type: "string" },
|
|
138
|
-
name: { type: "string" },
|
|
139
|
-
displayName: { type: "string" }
|
|
140
|
-
}
|
|
117
|
+
required: false
|
|
141
118
|
},
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
119
|
+
name: {
|
|
120
|
+
description: `Optional custom name for the passkey.
|
|
121
|
+
This can help identify the passkey when managing multiple credentials.`,
|
|
122
|
+
required: false
|
|
123
|
+
}
|
|
124
|
+
} },
|
|
125
|
+
content: { "application/json": { schema: {
|
|
126
|
+
type: "object",
|
|
127
|
+
properties: {
|
|
128
|
+
challenge: { type: "string" },
|
|
129
|
+
rp: {
|
|
145
130
|
type: "object",
|
|
146
131
|
properties: {
|
|
147
|
-
|
|
148
|
-
|
|
132
|
+
name: { type: "string" },
|
|
133
|
+
id: { type: "string" }
|
|
149
134
|
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
timeout: { type: "number" },
|
|
153
|
-
excludeCredentials: {
|
|
154
|
-
type: "array",
|
|
155
|
-
items: {
|
|
135
|
+
},
|
|
136
|
+
user: {
|
|
156
137
|
type: "object",
|
|
157
138
|
properties: {
|
|
158
139
|
id: { type: "string" },
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
140
|
+
name: { type: "string" },
|
|
141
|
+
displayName: { type: "string" }
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
pubKeyCredParams: {
|
|
145
|
+
type: "array",
|
|
146
|
+
items: {
|
|
147
|
+
type: "object",
|
|
148
|
+
properties: {
|
|
149
|
+
type: { type: "string" },
|
|
150
|
+
alg: { type: "number" }
|
|
163
151
|
}
|
|
164
152
|
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
153
|
+
},
|
|
154
|
+
timeout: { type: "number" },
|
|
155
|
+
excludeCredentials: {
|
|
156
|
+
type: "array",
|
|
157
|
+
items: {
|
|
158
|
+
type: "object",
|
|
159
|
+
properties: {
|
|
160
|
+
id: { type: "string" },
|
|
161
|
+
type: { type: "string" },
|
|
162
|
+
transports: {
|
|
163
|
+
type: "array",
|
|
164
|
+
items: { type: "string" }
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
authenticatorSelection: {
|
|
170
|
+
type: "object",
|
|
171
|
+
properties: {
|
|
172
|
+
authenticatorAttachment: { type: "string" },
|
|
173
|
+
requireResidentKey: { type: "boolean" },
|
|
174
|
+
userVerification: { type: "string" }
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
attestation: { type: "string" },
|
|
178
|
+
extensions: { type: "object" }
|
|
179
|
+
}
|
|
180
|
+
} } }
|
|
181
|
+
} }
|
|
182
|
+
}
|
|
183
|
+
}
|
|
181
184
|
}, async (ctx) => {
|
|
182
185
|
const { session } = ctx.context;
|
|
183
186
|
const userPasskeys = await ctx.context.adapter.findMany({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/passkey",
|
|
3
|
-
"version": "1.4.2
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Passkey plugin for Better Auth",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"tsdown": "^0.16.
|
|
35
|
-
"@better-auth/core": "1.4.2
|
|
36
|
-
"better-auth": "1.4.2
|
|
34
|
+
"tsdown": "^0.16.0",
|
|
35
|
+
"@better-auth/core": "1.4.2",
|
|
36
|
+
"better-auth": "1.4.2"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@simplewebauthn/browser": "^13.1.2",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"@better-fetch/fetch": "1.1.18",
|
|
46
46
|
"better-call": "1.1.0",
|
|
47
47
|
"nanostores": "^1.0.1",
|
|
48
|
-
"@better-auth/core": "1.4.2
|
|
49
|
-
"better-auth": "1.4.2
|
|
48
|
+
"@better-auth/core": "1.4.2",
|
|
49
|
+
"better-auth": "1.4.2"
|
|
50
50
|
},
|
|
51
51
|
"files": [
|
|
52
52
|
"dist"
|