@convex-dev/better-auth 0.7.0-alpha.11 → 0.7.0-alpha.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 (108) hide show
  1. package/dist/commonjs/client/adapter.d.ts +1 -10
  2. package/dist/commonjs/client/adapter.d.ts.map +1 -1
  3. package/dist/commonjs/client/adapter.js +192 -183
  4. package/dist/commonjs/client/adapter.js.map +1 -1
  5. package/dist/commonjs/client/index.d.ts +179 -238
  6. package/dist/commonjs/client/index.d.ts.map +1 -1
  7. package/dist/commonjs/client/index.js +67 -60
  8. package/dist/commonjs/client/index.js.map +1 -1
  9. package/dist/commonjs/component/lib.d.ts +548 -218
  10. package/dist/commonjs/component/lib.d.ts.map +1 -1
  11. package/dist/commonjs/component/lib.js +286 -315
  12. package/dist/commonjs/component/lib.js.map +1 -1
  13. package/dist/commonjs/component/schema.d.ts +28 -90
  14. package/dist/commonjs/component/schema.d.ts.map +1 -1
  15. package/dist/commonjs/component/schema.js +18 -76
  16. package/dist/commonjs/component/schema.js.map +1 -1
  17. package/dist/commonjs/component/util.d.ts +86 -148
  18. package/dist/commonjs/component/util.d.ts.map +1 -1
  19. package/dist/commonjs/nextjs/index.d.ts.map +1 -1
  20. package/dist/commonjs/nextjs/index.js +0 -12
  21. package/dist/commonjs/nextjs/index.js.map +1 -1
  22. package/dist/commonjs/plugins/convex/index.d.ts +11 -14
  23. package/dist/commonjs/plugins/convex/index.d.ts.map +1 -1
  24. package/dist/commonjs/plugins/convex/index.js +4 -10
  25. package/dist/commonjs/plugins/convex/index.js.map +1 -1
  26. package/dist/commonjs/plugins/cross-domain/client.d.ts +1 -1
  27. package/dist/commonjs/plugins/cross-domain/index.d.ts +3 -5
  28. package/dist/commonjs/plugins/cross-domain/index.d.ts.map +1 -1
  29. package/dist/commonjs/plugins/cross-domain/index.js +5 -19
  30. package/dist/commonjs/plugins/cross-domain/index.js.map +1 -1
  31. package/dist/commonjs/react/client.d.ts +1 -1
  32. package/dist/commonjs/react/client.d.ts.map +1 -1
  33. package/dist/commonjs/react/client.js +9 -3
  34. package/dist/commonjs/react/client.js.map +1 -1
  35. package/dist/commonjs/react-start/index.d.ts +3 -37
  36. package/dist/commonjs/react-start/index.d.ts.map +1 -1
  37. package/dist/commonjs/react-start/index.js +4 -20
  38. package/dist/commonjs/react-start/index.js.map +1 -1
  39. package/dist/esm/client/adapter.d.ts +1 -10
  40. package/dist/esm/client/adapter.d.ts.map +1 -1
  41. package/dist/esm/client/adapter.js +192 -183
  42. package/dist/esm/client/adapter.js.map +1 -1
  43. package/dist/esm/client/index.d.ts +179 -238
  44. package/dist/esm/client/index.d.ts.map +1 -1
  45. package/dist/esm/client/index.js +67 -60
  46. package/dist/esm/client/index.js.map +1 -1
  47. package/dist/esm/component/lib.d.ts +548 -218
  48. package/dist/esm/component/lib.d.ts.map +1 -1
  49. package/dist/esm/component/lib.js +286 -315
  50. package/dist/esm/component/lib.js.map +1 -1
  51. package/dist/esm/component/schema.d.ts +28 -90
  52. package/dist/esm/component/schema.d.ts.map +1 -1
  53. package/dist/esm/component/schema.js +18 -76
  54. package/dist/esm/component/schema.js.map +1 -1
  55. package/dist/esm/component/util.d.ts +86 -148
  56. package/dist/esm/component/util.d.ts.map +1 -1
  57. package/dist/esm/nextjs/index.d.ts.map +1 -1
  58. package/dist/esm/nextjs/index.js +0 -12
  59. package/dist/esm/nextjs/index.js.map +1 -1
  60. package/dist/esm/plugins/convex/index.d.ts +11 -14
  61. package/dist/esm/plugins/convex/index.d.ts.map +1 -1
  62. package/dist/esm/plugins/convex/index.js +4 -10
  63. package/dist/esm/plugins/convex/index.js.map +1 -1
  64. package/dist/esm/plugins/cross-domain/client.d.ts +1 -1
  65. package/dist/esm/plugins/cross-domain/index.d.ts +3 -5
  66. package/dist/esm/plugins/cross-domain/index.d.ts.map +1 -1
  67. package/dist/esm/plugins/cross-domain/index.js +5 -19
  68. package/dist/esm/plugins/cross-domain/index.js.map +1 -1
  69. package/dist/esm/react/client.d.ts +1 -1
  70. package/dist/esm/react/client.d.ts.map +1 -1
  71. package/dist/esm/react/client.js +9 -3
  72. package/dist/esm/react/client.js.map +1 -1
  73. package/dist/esm/react-start/index.d.ts +3 -37
  74. package/dist/esm/react-start/index.d.ts.map +1 -1
  75. package/dist/esm/react-start/index.js +4 -20
  76. package/dist/esm/react-start/index.js.map +1 -1
  77. package/package.json +5 -20
  78. package/src/client/adapter.ts +195 -191
  79. package/src/client/cors.ts +425 -0
  80. package/src/client/index.ts +80 -61
  81. package/src/component/_generated/api.d.ts +149 -605
  82. package/src/component/lib.ts +335 -444
  83. package/src/component/schema.ts +19 -81
  84. package/src/nextjs/index.ts +0 -17
  85. package/src/plugins/convex/index.ts +4 -12
  86. package/src/plugins/cross-domain/index.ts +5 -19
  87. package/src/react/client.tsx +11 -5
  88. package/src/react-start/index.ts +6 -33
  89. package/dist/commonjs/component/adapterTest.d.ts +0 -19
  90. package/dist/commonjs/component/adapterTest.d.ts.map +0 -1
  91. package/dist/commonjs/component/adapterTest.js +0 -82
  92. package/dist/commonjs/component/adapterTest.js.map +0 -1
  93. package/dist/commonjs/utils/index.d.ts +0 -2
  94. package/dist/commonjs/utils/index.d.ts.map +0 -1
  95. package/dist/commonjs/utils/index.js +0 -8
  96. package/dist/commonjs/utils/index.js.map +0 -1
  97. package/dist/esm/component/adapterTest.d.ts +0 -19
  98. package/dist/esm/component/adapterTest.d.ts.map +0 -1
  99. package/dist/esm/component/adapterTest.js +0 -82
  100. package/dist/esm/component/adapterTest.js.map +0 -1
  101. package/dist/esm/utils/index.d.ts +0 -2
  102. package/dist/esm/utils/index.d.ts.map +0 -1
  103. package/dist/esm/utils/index.js +0 -8
  104. package/dist/esm/utils/index.js.map +0 -1
  105. package/src/client/adapter.test.ts +0 -144
  106. package/src/component/adapterTest.ts +0 -141
  107. package/src/react-start/vite-env.d.ts +0 -2
  108. /package/src/{utils/index.ts → util.ts} +0 -0
@@ -6,23 +6,17 @@ export declare const vv: {
6
6
  _creationTime: number;
7
7
  image?: string | undefined;
8
8
  twoFactorEnabled?: boolean | undefined;
9
- isAnonymous?: boolean | undefined;
10
- username?: string | undefined;
11
- displayUsername?: string | undefined;
12
- userId?: string | undefined;
13
9
  name: string;
14
10
  email: string;
15
11
  emailVerified: boolean;
12
+ userId: string;
16
13
  createdAt: number;
17
14
  updatedAt: number;
18
15
  };
19
- fieldPaths: ("name" | "email" | "emailVerified" | "image" | "createdAt" | "updatedAt" | "twoFactorEnabled" | "isAnonymous" | "username" | "displayUsername" | "userId" | "_creationTime") | "_id";
16
+ fieldPaths: ("name" | "email" | "emailVerified" | "image" | "twoFactorEnabled" | "userId" | "createdAt" | "updatedAt" | "_creationTime") | "_id";
20
17
  indexes: {
21
- email_name: ["email", "name", "_creationTime"];
22
- name: ["name", "_creationTime"];
23
- userId: ["userId", "_creationTime"];
24
18
  email: ["email", "_creationTime"];
25
- username: ["username", "_creationTime"];
19
+ userId: ["userId", "_creationTime"];
26
20
  by_id: ["_id"];
27
21
  by_creation_time: ["_creationTime"];
28
22
  };
@@ -35,18 +29,18 @@ export declare const vv: {
35
29
  _creationTime: number;
36
30
  ipAddress?: string | undefined;
37
31
  userAgent?: string | undefined;
32
+ userId: string;
38
33
  createdAt: number;
39
34
  updatedAt: number;
40
- userId: string;
41
35
  expiresAt: number;
42
36
  token: string;
43
37
  };
44
- fieldPaths: ("createdAt" | "updatedAt" | "userId" | "_creationTime" | "expiresAt" | "token" | "ipAddress" | "userAgent") | "_id";
38
+ fieldPaths: ("userId" | "createdAt" | "updatedAt" | "_creationTime" | "expiresAt" | "token" | "ipAddress" | "userAgent") | "_id";
45
39
  indexes: {
46
- expiresAt: ["expiresAt", "_creationTime"];
47
- expiresAt_userId: ["expiresAt", "userId", "_creationTime"];
48
40
  token: ["token", "_creationTime"];
49
41
  userId: ["userId", "_creationTime"];
42
+ expiresAt: ["expiresAt", "_creationTime"];
43
+ userId_expiresAt: ["userId", "expiresAt", "_creationTime"];
50
44
  by_id: ["_id"];
51
45
  by_creation_time: ["_creationTime"];
52
46
  };
@@ -64,38 +58,18 @@ export declare const vv: {
64
58
  refreshTokenExpiresAt?: number | undefined;
65
59
  scope?: string | undefined;
66
60
  password?: string | undefined;
61
+ userId: string;
67
62
  createdAt: number;
68
63
  updatedAt: number;
69
- userId: string;
70
64
  accountId: string;
71
65
  providerId: string;
72
66
  };
73
- fieldPaths: ("createdAt" | "updatedAt" | "userId" | "_creationTime" | "accountId" | "providerId" | "accessToken" | "refreshToken" | "idToken" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "scope" | "password") | "_id";
67
+ fieldPaths: ("userId" | "createdAt" | "updatedAt" | "_creationTime" | "accountId" | "providerId" | "accessToken" | "refreshToken" | "idToken" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "scope" | "password") | "_id";
74
68
  indexes: {
75
- accountId: ["accountId", "_creationTime"];
76
- accountId_providerId: ["accountId", "providerId", "_creationTime"];
77
- providerId_userId: ["providerId", "userId", "_creationTime"];
78
69
  userId: ["userId", "_creationTime"];
79
- by_id: ["_id"];
80
- by_creation_time: ["_creationTime"];
81
- };
82
- searchIndexes: {};
83
- vectorIndexes: {};
84
- };
85
- verification: {
86
- document: {
87
- _id: import("convex/values").GenericId<"verification">;
88
- _creationTime: number;
89
- createdAt?: number | undefined;
90
- updatedAt?: number | undefined;
91
- expiresAt: number;
92
- identifier: string;
93
- value: string;
94
- };
95
- fieldPaths: ("createdAt" | "updatedAt" | "_creationTime" | "expiresAt" | "identifier" | "value") | "_id";
96
- indexes: {
97
- expiresAt: ["expiresAt", "_creationTime"];
98
- identifier: ["identifier", "_creationTime"];
70
+ accountId: ["accountId", "_creationTime"];
71
+ providerId_accountId: ["providerId", "accountId", "_creationTime"];
72
+ userId_providerId: ["userId", "providerId", "_creationTime"];
99
73
  by_id: ["_id"];
100
74
  by_creation_time: ["_creationTime"];
101
75
  };
@@ -119,33 +93,37 @@ export declare const vv: {
119
93
  searchIndexes: {};
120
94
  vectorIndexes: {};
121
95
  };
122
- jwks: {
96
+ verification: {
123
97
  document: {
124
- _id: import("convex/values").GenericId<"jwks">;
98
+ _id: import("convex/values").GenericId<"verification">;
125
99
  _creationTime: number;
126
- createdAt: number;
127
- publicKey: string;
128
- privateKey: string;
100
+ createdAt?: number | undefined;
101
+ updatedAt?: number | undefined;
102
+ expiresAt: number;
103
+ identifier: string;
104
+ value: string;
129
105
  };
130
- fieldPaths: "_id" | ("createdAt" | "_creationTime" | "publicKey" | "privateKey");
106
+ fieldPaths: ("createdAt" | "updatedAt" | "_creationTime" | "expiresAt" | "identifier" | "value") | "_id";
131
107
  indexes: {
108
+ identifier: ["identifier", "_creationTime"];
109
+ expiresAt: ["expiresAt", "_creationTime"];
132
110
  by_id: ["_id"];
133
111
  by_creation_time: ["_creationTime"];
134
112
  };
135
113
  searchIndexes: {};
136
114
  vectorIndexes: {};
137
115
  };
138
- rateLimit: {
116
+ jwks: {
139
117
  document: {
140
- _id: import("convex/values").GenericId<"rateLimit">;
118
+ _id: import("convex/values").GenericId<"jwks">;
141
119
  _creationTime: number;
142
- key?: string | undefined;
143
- count?: number | undefined;
144
- lastRequest?: number | undefined;
120
+ id?: string | undefined;
121
+ createdAt: number;
122
+ publicKey: string;
123
+ privateKey: string;
145
124
  };
146
- fieldPaths: ("_creationTime" | "key" | "count" | "lastRequest") | "_id";
125
+ fieldPaths: "_id" | ("id" | "createdAt" | "_creationTime" | "publicKey" | "privateKey");
147
126
  indexes: {
148
- key: ["key", "_creationTime"];
149
127
  by_id: ["_id"];
150
128
  by_creation_time: ["_creationTime"];
151
129
  };
@@ -160,23 +138,17 @@ export declare const vv: {
160
138
  _creationTime: number;
161
139
  image?: string | undefined;
162
140
  twoFactorEnabled?: boolean | undefined;
163
- isAnonymous?: boolean | undefined;
164
- username?: string | undefined;
165
- displayUsername?: string | undefined;
166
- userId?: string | undefined;
167
141
  name: string;
168
142
  email: string;
169
143
  emailVerified: boolean;
144
+ userId: string;
170
145
  createdAt: number;
171
146
  updatedAt: number;
172
147
  };
173
- fieldPaths: ("name" | "email" | "emailVerified" | "image" | "createdAt" | "updatedAt" | "twoFactorEnabled" | "isAnonymous" | "username" | "displayUsername" | "userId" | "_creationTime") | "_id";
148
+ fieldPaths: ("name" | "email" | "emailVerified" | "image" | "twoFactorEnabled" | "userId" | "createdAt" | "updatedAt" | "_creationTime") | "_id";
174
149
  indexes: {
175
- email_name: ["email", "name", "_creationTime"];
176
- name: ["name", "_creationTime"];
177
- userId: ["userId", "_creationTime"];
178
150
  email: ["email", "_creationTime"];
179
- username: ["username", "_creationTime"];
151
+ userId: ["userId", "_creationTime"];
180
152
  by_id: ["_id"];
181
153
  by_creation_time: ["_creationTime"];
182
154
  };
@@ -189,18 +161,18 @@ export declare const vv: {
189
161
  _creationTime: number;
190
162
  ipAddress?: string | undefined;
191
163
  userAgent?: string | undefined;
164
+ userId: string;
192
165
  createdAt: number;
193
166
  updatedAt: number;
194
- userId: string;
195
167
  expiresAt: number;
196
168
  token: string;
197
169
  };
198
- fieldPaths: ("createdAt" | "updatedAt" | "userId" | "_creationTime" | "expiresAt" | "token" | "ipAddress" | "userAgent") | "_id";
170
+ fieldPaths: ("userId" | "createdAt" | "updatedAt" | "_creationTime" | "expiresAt" | "token" | "ipAddress" | "userAgent") | "_id";
199
171
  indexes: {
200
- expiresAt: ["expiresAt", "_creationTime"];
201
- expiresAt_userId: ["expiresAt", "userId", "_creationTime"];
202
172
  token: ["token", "_creationTime"];
203
173
  userId: ["userId", "_creationTime"];
174
+ expiresAt: ["expiresAt", "_creationTime"];
175
+ userId_expiresAt: ["userId", "expiresAt", "_creationTime"];
204
176
  by_id: ["_id"];
205
177
  by_creation_time: ["_creationTime"];
206
178
  };
@@ -218,38 +190,18 @@ export declare const vv: {
218
190
  refreshTokenExpiresAt?: number | undefined;
219
191
  scope?: string | undefined;
220
192
  password?: string | undefined;
193
+ userId: string;
221
194
  createdAt: number;
222
195
  updatedAt: number;
223
- userId: string;
224
196
  accountId: string;
225
197
  providerId: string;
226
198
  };
227
- fieldPaths: ("createdAt" | "updatedAt" | "userId" | "_creationTime" | "accountId" | "providerId" | "accessToken" | "refreshToken" | "idToken" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "scope" | "password") | "_id";
199
+ fieldPaths: ("userId" | "createdAt" | "updatedAt" | "_creationTime" | "accountId" | "providerId" | "accessToken" | "refreshToken" | "idToken" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "scope" | "password") | "_id";
228
200
  indexes: {
229
- accountId: ["accountId", "_creationTime"];
230
- accountId_providerId: ["accountId", "providerId", "_creationTime"];
231
- providerId_userId: ["providerId", "userId", "_creationTime"];
232
201
  userId: ["userId", "_creationTime"];
233
- by_id: ["_id"];
234
- by_creation_time: ["_creationTime"];
235
- };
236
- searchIndexes: {};
237
- vectorIndexes: {};
238
- };
239
- verification: {
240
- document: {
241
- _id: import("convex/values").GenericId<"verification">;
242
- _creationTime: number;
243
- createdAt?: number | undefined;
244
- updatedAt?: number | undefined;
245
- expiresAt: number;
246
- identifier: string;
247
- value: string;
248
- };
249
- fieldPaths: ("createdAt" | "updatedAt" | "_creationTime" | "expiresAt" | "identifier" | "value") | "_id";
250
- indexes: {
251
- expiresAt: ["expiresAt", "_creationTime"];
252
- identifier: ["identifier", "_creationTime"];
202
+ accountId: ["accountId", "_creationTime"];
203
+ providerId_accountId: ["providerId", "accountId", "_creationTime"];
204
+ userId_providerId: ["userId", "providerId", "_creationTime"];
253
205
  by_id: ["_id"];
254
206
  by_creation_time: ["_creationTime"];
255
207
  };
@@ -273,33 +225,37 @@ export declare const vv: {
273
225
  searchIndexes: {};
274
226
  vectorIndexes: {};
275
227
  };
276
- jwks: {
228
+ verification: {
277
229
  document: {
278
- _id: import("convex/values").GenericId<"jwks">;
230
+ _id: import("convex/values").GenericId<"verification">;
279
231
  _creationTime: number;
280
- createdAt: number;
281
- publicKey: string;
282
- privateKey: string;
232
+ createdAt?: number | undefined;
233
+ updatedAt?: number | undefined;
234
+ expiresAt: number;
235
+ identifier: string;
236
+ value: string;
283
237
  };
284
- fieldPaths: "_id" | ("createdAt" | "_creationTime" | "publicKey" | "privateKey");
238
+ fieldPaths: ("createdAt" | "updatedAt" | "_creationTime" | "expiresAt" | "identifier" | "value") | "_id";
285
239
  indexes: {
240
+ identifier: ["identifier", "_creationTime"];
241
+ expiresAt: ["expiresAt", "_creationTime"];
286
242
  by_id: ["_id"];
287
243
  by_creation_time: ["_creationTime"];
288
244
  };
289
245
  searchIndexes: {};
290
246
  vectorIndexes: {};
291
247
  };
292
- rateLimit: {
248
+ jwks: {
293
249
  document: {
294
- _id: import("convex/values").GenericId<"rateLimit">;
250
+ _id: import("convex/values").GenericId<"jwks">;
295
251
  _creationTime: number;
296
- key?: string | undefined;
297
- count?: number | undefined;
298
- lastRequest?: number | undefined;
252
+ id?: string | undefined;
253
+ createdAt: number;
254
+ publicKey: string;
255
+ privateKey: string;
299
256
  };
300
- fieldPaths: ("_creationTime" | "key" | "count" | "lastRequest") | "_id";
257
+ fieldPaths: "_id" | ("id" | "createdAt" | "_creationTime" | "publicKey" | "privateKey");
301
258
  indexes: {
302
- key: ["key", "_creationTime"];
303
259
  by_id: ["_id"];
304
260
  by_creation_time: ["_creationTime"];
305
261
  };
@@ -310,13 +266,10 @@ export declare const vv: {
310
266
  user: import("convex/server").TableDefinition<import("convex/values").VObject<{
311
267
  image?: string | undefined;
312
268
  twoFactorEnabled?: boolean | undefined;
313
- isAnonymous?: boolean | undefined;
314
- username?: string | undefined;
315
- displayUsername?: string | undefined;
316
- userId?: string | undefined;
317
269
  name: string;
318
270
  email: string;
319
271
  emailVerified: boolean;
272
+ userId: string;
320
273
  createdAt: number;
321
274
  updatedAt: number;
322
275
  }, {
@@ -324,26 +277,20 @@ export declare const vv: {
324
277
  email: import("convex/values").VString<string, "required">;
325
278
  emailVerified: import("convex/values").VBoolean<boolean, "required">;
326
279
  image: import("convex/values").VString<string | undefined, "optional">;
280
+ twoFactorEnabled: import("convex/values").VBoolean<boolean | undefined, "optional">;
281
+ userId: import("convex/values").VString<string, "required">;
327
282
  createdAt: import("convex/values").VFloat64<number, "required">;
328
283
  updatedAt: import("convex/values").VFloat64<number, "required">;
329
- twoFactorEnabled: import("convex/values").VBoolean<boolean | undefined, "optional">;
330
- isAnonymous: import("convex/values").VBoolean<boolean | undefined, "optional">;
331
- username: import("convex/values").VString<string | undefined, "optional">;
332
- displayUsername: import("convex/values").VString<string | undefined, "optional">;
333
- userId: import("convex/values").VString<string | undefined, "optional">;
334
- }, "required", "name" | "email" | "emailVerified" | "image" | "createdAt" | "updatedAt" | "twoFactorEnabled" | "isAnonymous" | "username" | "displayUsername" | "userId">, {
335
- email_name: ["email", "name", "_creationTime"];
336
- name: ["name", "_creationTime"];
337
- userId: ["userId", "_creationTime"];
284
+ }, "required", "name" | "email" | "emailVerified" | "image" | "twoFactorEnabled" | "userId" | "createdAt" | "updatedAt">, {
338
285
  email: ["email", "_creationTime"];
339
- username: ["username", "_creationTime"];
286
+ userId: ["userId", "_creationTime"];
340
287
  }, {}, {}>;
341
288
  session: import("convex/server").TableDefinition<import("convex/values").VObject<{
342
289
  ipAddress?: string | undefined;
343
290
  userAgent?: string | undefined;
291
+ userId: string;
344
292
  createdAt: number;
345
293
  updatedAt: number;
346
- userId: string;
347
294
  expiresAt: number;
348
295
  token: string;
349
296
  }, {
@@ -354,11 +301,11 @@ export declare const vv: {
354
301
  ipAddress: import("convex/values").VString<string | undefined, "optional">;
355
302
  userAgent: import("convex/values").VString<string | undefined, "optional">;
356
303
  userId: import("convex/values").VString<string, "required">;
357
- }, "required", "createdAt" | "updatedAt" | "userId" | "expiresAt" | "token" | "ipAddress" | "userAgent">, {
358
- expiresAt: ["expiresAt", "_creationTime"];
359
- expiresAt_userId: ["expiresAt", "userId", "_creationTime"];
304
+ }, "required", "userId" | "createdAt" | "updatedAt" | "expiresAt" | "token" | "ipAddress" | "userAgent">, {
360
305
  token: ["token", "_creationTime"];
361
306
  userId: ["userId", "_creationTime"];
307
+ expiresAt: ["expiresAt", "_creationTime"];
308
+ userId_expiresAt: ["userId", "expiresAt", "_creationTime"];
362
309
  }, {}, {}>;
363
310
  account: import("convex/server").TableDefinition<import("convex/values").VObject<{
364
311
  accessToken?: string | undefined;
@@ -368,9 +315,9 @@ export declare const vv: {
368
315
  refreshTokenExpiresAt?: number | undefined;
369
316
  scope?: string | undefined;
370
317
  password?: string | undefined;
318
+ userId: string;
371
319
  createdAt: number;
372
320
  updatedAt: number;
373
- userId: string;
374
321
  accountId: string;
375
322
  providerId: string;
376
323
  }, {
@@ -386,10 +333,21 @@ export declare const vv: {
386
333
  password: import("convex/values").VString<string | undefined, "optional">;
387
334
  createdAt: import("convex/values").VFloat64<number, "required">;
388
335
  updatedAt: import("convex/values").VFloat64<number, "required">;
389
- }, "required", "createdAt" | "updatedAt" | "userId" | "accountId" | "providerId" | "accessToken" | "refreshToken" | "idToken" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "scope" | "password">, {
336
+ }, "required", "userId" | "createdAt" | "updatedAt" | "accountId" | "providerId" | "accessToken" | "refreshToken" | "idToken" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "scope" | "password">, {
337
+ userId: ["userId", "_creationTime"];
390
338
  accountId: ["accountId", "_creationTime"];
391
- accountId_providerId: ["accountId", "providerId", "_creationTime"];
392
- providerId_userId: ["providerId", "userId", "_creationTime"];
339
+ providerId_accountId: ["providerId", "accountId", "_creationTime"];
340
+ userId_providerId: ["userId", "providerId", "_creationTime"];
341
+ }, {}, {}>;
342
+ twoFactor: import("convex/server").TableDefinition<import("convex/values").VObject<{
343
+ userId: string;
344
+ secret: string;
345
+ backupCodes: string;
346
+ }, {
347
+ secret: import("convex/values").VString<string, "required">;
348
+ backupCodes: import("convex/values").VString<string, "required">;
349
+ userId: import("convex/values").VString<string, "required">;
350
+ }, "required", "userId" | "secret" | "backupCodes">, {
393
351
  userId: ["userId", "_creationTime"];
394
352
  }, {}, {}>;
395
353
  verification: import("convex/server").TableDefinition<import("convex/values").VObject<{
@@ -405,21 +363,11 @@ export declare const vv: {
405
363
  createdAt: import("convex/values").VFloat64<number | undefined, "optional">;
406
364
  updatedAt: import("convex/values").VFloat64<number | undefined, "optional">;
407
365
  }, "required", "createdAt" | "updatedAt" | "expiresAt" | "identifier" | "value">, {
408
- expiresAt: ["expiresAt", "_creationTime"];
409
366
  identifier: ["identifier", "_creationTime"];
410
- }, {}, {}>;
411
- twoFactor: import("convex/server").TableDefinition<import("convex/values").VObject<{
412
- userId: string;
413
- secret: string;
414
- backupCodes: string;
415
- }, {
416
- secret: import("convex/values").VString<string, "required">;
417
- backupCodes: import("convex/values").VString<string, "required">;
418
- userId: import("convex/values").VString<string, "required">;
419
- }, "required", "userId" | "secret" | "backupCodes">, {
420
- userId: ["userId", "_creationTime"];
367
+ expiresAt: ["expiresAt", "_creationTime"];
421
368
  }, {}, {}>;
422
369
  jwks: import("convex/server").TableDefinition<import("convex/values").VObject<{
370
+ id?: string | undefined;
423
371
  createdAt: number;
424
372
  publicKey: string;
425
373
  privateKey: string;
@@ -427,18 +375,8 @@ export declare const vv: {
427
375
  publicKey: import("convex/values").VString<string, "required">;
428
376
  privateKey: import("convex/values").VString<string, "required">;
429
377
  createdAt: import("convex/values").VFloat64<number, "required">;
430
- }, "required", "createdAt" | "publicKey" | "privateKey">, {}, {}, {}>;
431
- rateLimit: import("convex/server").TableDefinition<import("convex/values").VObject<{
432
- key?: string | undefined;
433
- count?: number | undefined;
434
- lastRequest?: number | undefined;
435
- }, {
436
- key: import("convex/values").VString<string | undefined, "optional">;
437
- count: import("convex/values").VFloat64<number | undefined, "optional">;
438
- lastRequest: import("convex/values").VFloat64<number | undefined, "optional">;
439
- }, "required", "key" | "count" | "lastRequest">, {
440
- key: ["key", "_creationTime"];
441
- }, {}, {}>;
378
+ id: import("convex/values").VString<string | undefined, "optional">;
379
+ }, "required", "id" | "createdAt" | "publicKey" | "privateKey">, {}, {}, {}>;
442
380
  }[TableName]["validator"], {
443
381
  _id: import("convex/values").VId<import("convex/values").GenericId<TableName>, "required">;
444
382
  _creationTime: import("convex/values").VFloat64<number, "required">;
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/component/util.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gMACstS,eAAgB,qEAAqE,CAAC,mJAA0H,aAAc,+MAAuL,eAAe;;mFAAkV,GAAG,gDAAwB,WAAW,2BAA0B,WAAY;;;CADvgU,CAAC"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/component/util.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gMACstS,eAAgB,qEAAqE,CAAC,mJAA0H,aAAc,+MAAuL,eAAe;;mFAAkV,GAAG,gDAAwB,WAAW,2BAA0B,WAAY;;;CADvgU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/nextjs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAcjD,eAAO,MAAM,QAAQ,GACnB,YAAY,CAAC,GAAG,EAAE,gBAAgB,CAAC,GAAG,CAAC,KAAK,UAAU,CAAC,OAAO,UAAU,CAAC,gCAY1E,CAAC;AAeF,eAAO,MAAM,aAAa,GAAI,OAAO;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE;mBAC9C,OAAO;oBACN,OAAO;CACvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/nextjs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjD,eAAO,MAAM,QAAQ,GACnB,YAAY,CAAC,GAAG,EAAE,gBAAgB,CAAC,GAAG,CAAC,KAAK,UAAU,CAAC,OAAO,UAAU,CAAC,gCAS1E,CAAC;AAYF,eAAO,MAAM,aAAa,GAAI,OAAO;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE;mBAC9C,OAAO;oBACN,OAAO;CACvB,CAAC"}
@@ -1,15 +1,6 @@
1
1
  import { createCookieGetter } from "better-auth/cookies";
2
2
  import { JWT_COOKIE_NAME } from "../plugins/convex";
3
- const requireBaseURL = (createAuth) => {
4
- if (!createAuth({}).options.baseURL) {
5
- throw new Error("No baseURL found in Better Auth config. baseUrl should be set to your Convex Site URL.");
6
- }
7
- return createAuth({}).options.baseURL;
8
- };
9
3
  export const getToken = async (createAuth) => {
10
- // Require baseURL here because it's protocol determines cookie secure mode,
11
- // and must be set to ensure cookies work between Next.js and Convex.
12
- requireBaseURL(createAuth);
13
4
  const { cookies } = await import("next/headers");
14
5
  const cookieStore = await cookies();
15
6
  const auth = createAuth({});
@@ -21,9 +12,6 @@ export const getToken = async (createAuth) => {
21
12
  const handler = (request, opts) => {
22
13
  const requestUrl = new URL(request.url);
23
14
  const convexSiteUrl = opts?.convexSiteUrl ?? process.env.NEXT_PUBLIC_CONVEX_SITE_URL;
24
- if (!convexSiteUrl) {
25
- throw new Error("NEXT_PUBLIC_CONVEX_SITE_URL is not set");
26
- }
27
15
  const nextUrl = `${convexSiteUrl}${requestUrl.pathname}${requestUrl.search}`;
28
16
  const newRequest = new Request(nextUrl, request);
29
17
  newRequest.headers.set("accept-encoding", "application/json");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nextjs/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,cAAc,GAAG,CACrB,UAAyE,EACzE,EAAE;IACF,IAAI,CAAC,UAAU,CAAC,EAAS,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3C,MAAM,IAAI,KAAK,CACb,wFAAwF,CACzF,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC,EAAS,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,EAC3B,UAAyE,EACzE,EA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;IAC7E,MAAM,UAAU,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACjD,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;IAC9D,OAAO,KAAK,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC3E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAiC,EAAE,EAAE,CAAC,CAAC;IACnE,GAAG,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC;IACjD,IAAI,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC;CACnD,CAAC,CAAC"}
@@ -16,10 +16,7 @@ export declare const convex: (opts?: {
16
16
  }[];
17
17
  after: ({
18
18
  matcher(): true;
19
- handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<Response | {
20
- redirect: boolean;
21
- url: string;
22
- } | undefined>;
19
+ handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<Response | undefined>;
23
20
  } | {
24
21
  matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
25
22
  handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
@@ -56,8 +53,8 @@ export declare const convex: (opts?: {
56
53
  user: {
57
54
  id: string;
58
55
  name: string;
59
- emailVerified: boolean;
60
56
  email: string;
57
+ emailVerified: boolean;
61
58
  createdAt: Date;
62
59
  updatedAt: Date;
63
60
  image?: string | null | undefined | undefined;
@@ -65,10 +62,10 @@ export declare const convex: (opts?: {
65
62
  session: {
66
63
  userId: string;
67
64
  id: string;
68
- token: string;
69
- expiresAt: Date;
70
65
  createdAt: Date;
71
66
  updatedAt: Date;
67
+ expiresAt: Date;
68
+ token: string;
72
69
  ipAddress?: string | null | undefined | undefined;
73
70
  userAgent?: string | null | undefined | undefined;
74
71
  };
@@ -77,8 +74,8 @@ export declare const convex: (opts?: {
77
74
  user: {
78
75
  id: string;
79
76
  name: string;
80
- emailVerified: boolean;
81
77
  email: string;
78
+ emailVerified: boolean;
82
79
  createdAt: Date;
83
80
  updatedAt: Date;
84
81
  image?: string | null | undefined | undefined;
@@ -86,10 +83,10 @@ export declare const convex: (opts?: {
86
83
  session: {
87
84
  userId: string;
88
85
  id: string;
89
- token: string;
90
- expiresAt: Date;
91
86
  createdAt: Date;
92
87
  updatedAt: Date;
88
+ expiresAt: Date;
89
+ token: string;
93
90
  ipAddress?: string | null | undefined | undefined;
94
91
  userAgent?: string | null | undefined | undefined;
95
92
  };
@@ -314,19 +311,19 @@ export declare const convex: (opts?: {
314
311
  session: {
315
312
  session: Record<string, any> & {
316
313
  id: string;
317
- token: string;
318
- userId: string;
319
- expiresAt: Date;
320
314
  createdAt: Date;
321
315
  updatedAt: Date;
316
+ userId: string;
317
+ expiresAt: Date;
318
+ token: string;
322
319
  ipAddress?: string | null | undefined;
323
320
  userAgent?: string | null | undefined;
324
321
  };
325
322
  user: Record<string, any> & {
326
323
  id: string;
327
324
  name: string;
328
- emailVerified: boolean;
329
325
  email: string;
326
+ emailVerified: boolean;
330
327
  createdAt: Date;
331
328
  updatedAt: Date;
332
329
  image?: string | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/convex/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe,eAAe,CAAC;AAE5C,eAAO,MAAM,MAAM,GACjB,OAAM;IACJ,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAD1rhF,CAAC"}
@@ -32,7 +32,7 @@ export const convex = (opts = {}) => {
32
32
  return session.user.userId;
33
33
  },
34
34
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
35
- definePayload: ({ user: { id, userId, image, ...user }, session }) => ({
35
+ definePayload: ({ user: { id, userId, ...user }, session }) => ({
36
36
  ...user,
37
37
  sessionId: session.id,
38
38
  }),
@@ -86,13 +86,8 @@ export const convex = (opts = {}) => {
86
86
  },
87
87
  {
88
88
  matcher: (ctx) => {
89
- return (ctx.path.startsWith("/sign-in") ||
90
- ctx.path.startsWith("/sign-up") ||
91
- ctx.path.startsWith("/callback") ||
92
- ctx.path.startsWith("/oauth2/callback") ||
93
- ctx.path.startsWith("/magic-link/verify") ||
94
- ctx.path.startsWith("/email-otp/verify-email") ||
95
- ctx.path.startsWith("/phone-number/verify"));
89
+ return (ctx.path?.startsWith("/sign-in") ||
90
+ ctx.path?.startsWith("/callback"));
96
91
  },
97
92
  handler: createAuthMiddleware(async (ctx) => {
98
93
  // Set jwt cookie at login for ssa
@@ -122,8 +117,7 @@ export const convex = (opts = {}) => {
122
117
  },
123
118
  {
124
119
  matcher: (ctx) => {
125
- return (ctx.path?.startsWith("/sign-out") ||
126
- ctx.path?.startsWith("/delete-user"));
120
+ return ctx.path?.startsWith("/sign-out");
127
121
  },
128
122
  handler: createAuthMiddleware(async (ctx) => {
129
123
  const jwtCookie = ctx.context.createAuthCookie(JWT_COOKIE_NAME, {