@better-auth/passkey 1.4.0-beta.19 → 1.4.0-beta.21

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
@@ -1,4 +1,4 @@
1
- import { n as Passkey, t as passkey } from "./index-DJhxJqu3.mjs";
1
+ import { n as Passkey, t as passkey } from "./index-scVTCUbk.mjs";
2
2
  import * as nanostores0 from "nanostores";
3
3
  import { atom } from "nanostores";
4
4
  import * as better_auth0 from "better-auth";
@@ -1,7 +1,7 @@
1
1
  import * as _simplewebauthn_server0 from "@simplewebauthn/server";
2
2
  import { AuthenticationResponseJSON, CredentialDeviceType, PublicKeyCredentialCreationOptionsJSON } from "@simplewebauthn/server";
3
3
  import * as better_call0 from "better-call";
4
- import { z } from "zod";
4
+ import * as z from "zod";
5
5
  import { InferOptionSchema } from "better-auth/types";
6
6
 
7
7
  //#region src/schema.d.ts
@@ -23,10 +23,12 @@ declare const schema: {
23
23
  field: string;
24
24
  };
25
25
  required: true;
26
+ index: true;
26
27
  };
27
28
  credentialID: {
28
29
  type: "string";
29
30
  required: true;
31
+ index: true;
30
32
  };
31
33
  counter: {
32
34
  type: "number";
@@ -155,6 +157,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
155
157
  metadata: {
156
158
  client: boolean;
157
159
  openapi: {
160
+ operationId: string;
158
161
  description: string;
159
162
  responses: {
160
163
  200: {
@@ -276,6 +279,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
276
279
  method: "POST";
277
280
  metadata: {
278
281
  openapi: {
282
+ operationId: string;
279
283
  description: string;
280
284
  responses: {
281
285
  200: {
@@ -398,6 +402,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
398
402
  }>)[];
399
403
  metadata: {
400
404
  openapi: {
405
+ operationId: string;
401
406
  description: string;
402
407
  responses: {
403
408
  200: {
@@ -426,6 +431,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
426
431
  }, z.core.$strip>;
427
432
  metadata: {
428
433
  openapi: {
434
+ operationId: string;
429
435
  description: string;
430
436
  responses: {
431
437
  200: {
@@ -694,10 +700,12 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
694
700
  field: string;
695
701
  };
696
702
  required: true;
703
+ index: true;
697
704
  };
698
705
  credentialID: {
699
706
  type: "string";
700
707
  required: true;
708
+ index: true;
701
709
  };
702
710
  counter: {
703
711
  type: "number";
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as Passkey, r as PasskeyOptions, t as passkey } from "./index-DJhxJqu3.mjs";
1
+ import { n as Passkey, r as PasskeyOptions, t as passkey } from "./index-scVTCUbk.mjs";
2
2
  export { Passkey, PasskeyOptions, passkey };
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ import { setSessionCookie } from "better-auth/cookies";
7
7
  import { generateRandomString } from "better-auth/crypto";
8
8
  import { mergeSchema } from "better-auth/db";
9
9
  import { APIError } from "better-call";
10
- import { z } from "zod";
10
+ import * as z from "zod";
11
11
  import { defineErrorCodes } from "@better-auth/core/utils";
12
12
 
13
13
  //#region src/error-codes.ts
@@ -38,11 +38,13 @@ const schema = { passkey: { fields: {
38
38
  model: "user",
39
39
  field: "id"
40
40
  },
41
- required: true
41
+ required: true,
42
+ index: true
42
43
  },
43
44
  credentialID: {
44
45
  type: "string",
45
- required: true
46
+ required: true,
47
+ index: true
46
48
  },
47
49
  counter: {
48
50
  type: "number",
@@ -103,6 +105,7 @@ const passkey = (options) => {
103
105
  metadata: {
104
106
  client: false,
105
107
  openapi: {
108
+ operationId: "generatePasskeyRegistrationOptions",
106
109
  description: "Generate registration options for a new passkey",
107
110
  responses: { 200: {
108
111
  description: "Success",
@@ -226,6 +229,7 @@ const passkey = (options) => {
226
229
  generatePasskeyAuthenticationOptions: createAuthEndpoint("/passkey/generate-authenticate-options", {
227
230
  method: "POST",
228
231
  metadata: { openapi: {
232
+ operationId: "passkeyGenerateAuthenticateOptions",
229
233
  description: "Generate authentication options for a passkey",
230
234
  responses: { 200: {
231
235
  description: "Success",
@@ -320,6 +324,7 @@ const passkey = (options) => {
320
324
  }),
321
325
  use: [freshSessionMiddleware],
322
326
  metadata: { openapi: {
327
+ operationId: "passkeyVerifyRegistration",
323
328
  description: "Verify registration of a new passkey",
324
329
  responses: {
325
330
  200: {
@@ -378,6 +383,7 @@ const passkey = (options) => {
378
383
  body: z.object({ response: z.record(z.any(), z.any()) }),
379
384
  metadata: {
380
385
  openapi: {
386
+ operationId: "passkeyVerifyAuthentication",
381
387
  description: "Verify authentication of a passkey",
382
388
  responses: { 200: {
383
389
  description: "Success",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/passkey",
3
- "version": "1.4.0-beta.19",
3
+ "version": "1.4.0-beta.21",
4
4
  "type": "module",
5
5
  "description": "Passkey plugin for Better Auth",
6
6
  "main": "dist/index.mjs",
@@ -32,8 +32,8 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "tsdown": "^0.16.0",
35
- "@better-auth/core": "1.4.0-beta.19",
36
- "better-auth": "1.4.0-beta.19"
35
+ "@better-auth/core": "1.4.0-beta.21",
36
+ "better-auth": "1.4.0-beta.21"
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.0.26",
47
47
  "nanostores": "^1.0.1",
48
- "@better-auth/core": "1.4.0-beta.19",
49
- "better-auth": "1.4.0-beta.19"
48
+ "@better-auth/core": "1.4.0-beta.21",
49
+ "better-auth": "1.4.0-beta.21"
50
50
  },
51
51
  "files": [
52
52
  "dist"