better-auth 1.2.5-beta.7 → 1.2.5-beta.8

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 (181) hide show
  1. package/dist/adapters/drizzle-adapter/index.d.cts +1 -1
  2. package/dist/adapters/drizzle-adapter/index.d.mts +1 -1
  3. package/dist/adapters/drizzle-adapter/index.d.ts +1 -1
  4. package/dist/adapters/kysely-adapter/index.d.cts +1 -1
  5. package/dist/adapters/kysely-adapter/index.d.mts +1 -1
  6. package/dist/adapters/kysely-adapter/index.d.ts +1 -1
  7. package/dist/adapters/memory-adapter/index.d.cts +1 -1
  8. package/dist/adapters/memory-adapter/index.d.mts +1 -1
  9. package/dist/adapters/memory-adapter/index.d.ts +1 -1
  10. package/dist/adapters/mongodb-adapter/index.d.cts +1 -1
  11. package/dist/adapters/mongodb-adapter/index.d.mts +1 -1
  12. package/dist/adapters/mongodb-adapter/index.d.ts +1 -1
  13. package/dist/adapters/prisma-adapter/index.d.cts +1 -1
  14. package/dist/adapters/prisma-adapter/index.d.mts +1 -1
  15. package/dist/adapters/prisma-adapter/index.d.ts +1 -1
  16. package/dist/adapters/test.d.cts +1 -1
  17. package/dist/adapters/test.d.mts +1 -1
  18. package/dist/adapters/test.d.ts +1 -1
  19. package/dist/api/index.cjs +8 -4
  20. package/dist/api/index.d.cts +1 -1
  21. package/dist/api/index.d.mts +1 -1
  22. package/dist/api/index.d.ts +1 -1
  23. package/dist/api/index.mjs +9 -5
  24. package/dist/client/index.d.cts +1 -1
  25. package/dist/client/index.d.mts +1 -1
  26. package/dist/client/index.d.ts +1 -1
  27. package/dist/client/plugins/index.d.cts +2 -2
  28. package/dist/client/plugins/index.d.mts +2 -2
  29. package/dist/client/plugins/index.d.ts +2 -2
  30. package/dist/client/react/index.d.cts +1 -1
  31. package/dist/client/react/index.d.mts +1 -1
  32. package/dist/client/react/index.d.ts +1 -1
  33. package/dist/client/solid/index.d.cts +1 -1
  34. package/dist/client/solid/index.d.mts +1 -1
  35. package/dist/client/solid/index.d.ts +1 -1
  36. package/dist/client/svelte/index.d.cts +1 -1
  37. package/dist/client/svelte/index.d.mts +1 -1
  38. package/dist/client/svelte/index.d.ts +1 -1
  39. package/dist/client/vue/index.d.cts +1 -1
  40. package/dist/client/vue/index.d.mts +1 -1
  41. package/dist/client/vue/index.d.ts +1 -1
  42. package/dist/cookies/index.d.cts +1 -1
  43. package/dist/cookies/index.d.mts +1 -1
  44. package/dist/cookies/index.d.ts +1 -1
  45. package/dist/db/index.d.cts +2 -2
  46. package/dist/db/index.d.mts +2 -2
  47. package/dist/db/index.d.ts +2 -2
  48. package/dist/index.cjs +1 -1
  49. package/dist/index.d.cts +2 -2
  50. package/dist/index.d.mts +2 -2
  51. package/dist/index.d.ts +2 -2
  52. package/dist/index.mjs +2 -2
  53. package/dist/integrations/next-js.cjs +3 -3
  54. package/dist/integrations/next-js.d.cts +1 -1
  55. package/dist/integrations/next-js.d.mts +1 -1
  56. package/dist/integrations/next-js.d.ts +1 -1
  57. package/dist/integrations/next-js.mjs +3 -3
  58. package/dist/integrations/node.d.cts +1 -1
  59. package/dist/integrations/node.d.mts +1 -1
  60. package/dist/integrations/node.d.ts +1 -1
  61. package/dist/integrations/svelte-kit.d.cts +1 -1
  62. package/dist/integrations/svelte-kit.d.mts +1 -1
  63. package/dist/integrations/svelte-kit.d.ts +1 -1
  64. package/dist/oauth2/index.d.cts +2 -2
  65. package/dist/oauth2/index.d.mts +2 -2
  66. package/dist/oauth2/index.d.ts +2 -2
  67. package/dist/plugins/admin/index.cjs +2 -2
  68. package/dist/plugins/admin/index.d.cts +1 -1
  69. package/dist/plugins/admin/index.d.mts +1 -1
  70. package/dist/plugins/admin/index.d.ts +1 -1
  71. package/dist/plugins/admin/index.mjs +2 -2
  72. package/dist/plugins/anonymous/index.cjs +1 -1
  73. package/dist/plugins/anonymous/index.d.cts +1 -1
  74. package/dist/plugins/anonymous/index.d.mts +1 -1
  75. package/dist/plugins/anonymous/index.d.ts +1 -1
  76. package/dist/plugins/anonymous/index.mjs +1 -1
  77. package/dist/plugins/bearer/index.cjs +1 -1
  78. package/dist/plugins/bearer/index.d.cts +1 -1
  79. package/dist/plugins/bearer/index.d.mts +1 -1
  80. package/dist/plugins/bearer/index.d.ts +1 -1
  81. package/dist/plugins/bearer/index.mjs +1 -1
  82. package/dist/plugins/custom-session/index.cjs +1 -1
  83. package/dist/plugins/custom-session/index.d.cts +1 -1
  84. package/dist/plugins/custom-session/index.d.mts +1 -1
  85. package/dist/plugins/custom-session/index.d.ts +1 -1
  86. package/dist/plugins/custom-session/index.mjs +1 -1
  87. package/dist/plugins/email-otp/index.cjs +1 -1
  88. package/dist/plugins/email-otp/index.d.cts +1 -1
  89. package/dist/plugins/email-otp/index.d.mts +1 -1
  90. package/dist/plugins/email-otp/index.d.ts +1 -1
  91. package/dist/plugins/email-otp/index.mjs +1 -1
  92. package/dist/plugins/generic-oauth/index.cjs +1 -1
  93. package/dist/plugins/generic-oauth/index.d.cts +1 -1
  94. package/dist/plugins/generic-oauth/index.d.mts +1 -1
  95. package/dist/plugins/generic-oauth/index.d.ts +1 -1
  96. package/dist/plugins/generic-oauth/index.mjs +1 -1
  97. package/dist/plugins/index.cjs +4 -4
  98. package/dist/plugins/index.d.cts +2 -2
  99. package/dist/plugins/index.d.mts +2 -2
  100. package/dist/plugins/index.d.ts +2 -2
  101. package/dist/plugins/index.mjs +5 -5
  102. package/dist/plugins/jwt/index.cjs +1 -1
  103. package/dist/plugins/jwt/index.d.cts +1 -1
  104. package/dist/plugins/jwt/index.d.mts +1 -1
  105. package/dist/plugins/jwt/index.d.ts +1 -1
  106. package/dist/plugins/jwt/index.mjs +1 -1
  107. package/dist/plugins/magic-link/index.cjs +1 -1
  108. package/dist/plugins/magic-link/index.mjs +1 -1
  109. package/dist/plugins/multi-session/index.cjs +1 -1
  110. package/dist/plugins/multi-session/index.d.cts +1 -1
  111. package/dist/plugins/multi-session/index.d.mts +1 -1
  112. package/dist/plugins/multi-session/index.d.ts +1 -1
  113. package/dist/plugins/multi-session/index.mjs +1 -1
  114. package/dist/plugins/oauth-proxy/index.cjs +1 -1
  115. package/dist/plugins/oauth-proxy/index.d.cts +1 -1
  116. package/dist/plugins/oauth-proxy/index.d.mts +1 -1
  117. package/dist/plugins/oauth-proxy/index.d.ts +1 -1
  118. package/dist/plugins/oauth-proxy/index.mjs +1 -1
  119. package/dist/plugins/oidc-provider/index.cjs +1 -1
  120. package/dist/plugins/oidc-provider/index.d.cts +1 -1
  121. package/dist/plugins/oidc-provider/index.d.mts +1 -1
  122. package/dist/plugins/oidc-provider/index.d.ts +1 -1
  123. package/dist/plugins/oidc-provider/index.mjs +1 -1
  124. package/dist/plugins/one-tap/index.cjs +1 -1
  125. package/dist/plugins/one-tap/index.mjs +1 -1
  126. package/dist/plugins/open-api/index.cjs +1 -1
  127. package/dist/plugins/open-api/index.d.cts +1 -1
  128. package/dist/plugins/open-api/index.d.mts +1 -1
  129. package/dist/plugins/open-api/index.d.ts +1 -1
  130. package/dist/plugins/open-api/index.mjs +1 -1
  131. package/dist/plugins/organization/index.cjs +2 -2
  132. package/dist/plugins/organization/index.d.cts +1 -1
  133. package/dist/plugins/organization/index.d.mts +1 -1
  134. package/dist/plugins/organization/index.d.ts +1 -1
  135. package/dist/plugins/organization/index.mjs +2 -2
  136. package/dist/plugins/passkey/index.cjs +1 -1
  137. package/dist/plugins/passkey/index.d.cts +1 -1
  138. package/dist/plugins/passkey/index.d.mts +1 -1
  139. package/dist/plugins/passkey/index.d.ts +1 -1
  140. package/dist/plugins/passkey/index.mjs +1 -1
  141. package/dist/plugins/phone-number/index.cjs +1 -1
  142. package/dist/plugins/phone-number/index.d.cts +1 -1
  143. package/dist/plugins/phone-number/index.d.mts +1 -1
  144. package/dist/plugins/phone-number/index.d.ts +1 -1
  145. package/dist/plugins/phone-number/index.mjs +1 -1
  146. package/dist/plugins/sso/index.cjs +1 -1
  147. package/dist/plugins/sso/index.d.cts +1 -1
  148. package/dist/plugins/sso/index.d.mts +1 -1
  149. package/dist/plugins/sso/index.d.ts +1 -1
  150. package/dist/plugins/sso/index.mjs +1 -1
  151. package/dist/plugins/two-factor/index.cjs +2 -2
  152. package/dist/plugins/two-factor/index.d.cts +1 -1
  153. package/dist/plugins/two-factor/index.d.mts +1 -1
  154. package/dist/plugins/two-factor/index.d.ts +1 -1
  155. package/dist/plugins/two-factor/index.mjs +2 -2
  156. package/dist/plugins/username/index.cjs +1 -1
  157. package/dist/plugins/username/index.d.cts +1 -1
  158. package/dist/plugins/username/index.d.mts +1 -1
  159. package/dist/plugins/username/index.d.ts +1 -1
  160. package/dist/plugins/username/index.mjs +1 -1
  161. package/dist/shared/{better-auth.2fbYHU01.d.mts → better-auth.3uxCR-1i.d.ts} +2 -2
  162. package/dist/shared/{better-auth.vdKrG2Zp.mjs → better-auth.73eFuzj6.mjs} +7 -8
  163. package/dist/shared/{better-auth.UO_GAdaM.mjs → better-auth.BCV_xmAm.mjs} +2 -3
  164. package/dist/shared/{better-auth.1GtLBK1J.cjs → better-auth.BKKQIUTB.cjs} +2 -3
  165. package/dist/shared/{better-auth.CV08HOs_.d.ts → better-auth.Blj1xlkZ.d.mts} +2 -2
  166. package/dist/shared/{better-auth.CKCPM9Oy.mjs → better-auth.Bmxywnpb.mjs} +1 -1
  167. package/dist/shared/{better-auth.aci1hpij.cjs → better-auth.BpqrcwQV.cjs} +1 -1
  168. package/dist/shared/{better-auth.BjXInNL7.d.ts → better-auth.BrZtYPth.d.ts} +1 -1
  169. package/dist/shared/{better-auth.D_6ikAPh.d.mts → better-auth.Ci5pgoju.d.mts} +24 -24
  170. package/dist/shared/{better-auth.lijknCkI.mjs → better-auth.CroE2PB-.mjs} +1 -1
  171. package/dist/shared/{better-auth.B3unKFue.cjs → better-auth.D34f3UQF.cjs} +1 -1
  172. package/dist/shared/{better-auth.BODzPfJo.d.ts → better-auth.DPgLMy-i.d.ts} +24 -24
  173. package/dist/shared/{better-auth.C7O0617V.d.mts → better-auth.DXkSM8GQ.d.mts} +1 -1
  174. package/dist/shared/{better-auth.Al7ra9Pe.d.cts → better-auth.Ddyg4QNk.d.cts} +1 -1
  175. package/dist/shared/{better-auth.RZCibiKy.d.cts → better-auth.UATG5YO8.d.cts} +1 -1
  176. package/dist/shared/{better-auth.ChassmKE.cjs → better-auth.UNIWw9Sf.cjs} +7 -8
  177. package/dist/shared/{better-auth.BkL9ntGY.d.cts → better-auth.feQWZZzF.d.cts} +24 -24
  178. package/dist/types/index.d.cts +2 -2
  179. package/dist/types/index.d.mts +2 -2
  180. package/dist/types/index.d.ts +2 -2
  181. package/package.json +1 -1
@@ -2970,8 +2970,7 @@ const unlinkAccount = createAuthEndpoint(
2970
2970
  method: "POST",
2971
2971
  body: z.object({
2972
2972
  providerId: z.string(),
2973
- accountId: z.string()
2974
- // Add account ID to identify which account to unlink
2973
+ accountId: z.string().optional()
2975
2974
  }),
2976
2975
  use: [freshSessionMiddleware]
2977
2976
  },
@@ -2980,19 +2979,19 @@ const unlinkAccount = createAuthEndpoint(
2980
2979
  const accounts = await ctx.context.internalAdapter.findAccounts(
2981
2980
  ctx.context.session.user.id
2982
2981
  );
2982
+ if (accounts.length === 1 && !ctx.context.options.account?.accountLinking?.allowUnlinkingAll) {
2983
+ throw new APIError("BAD_REQUEST", {
2984
+ message: BASE_ERROR_CODES.FAILED_TO_UNLINK_LAST_ACCOUNT
2985
+ });
2986
+ }
2983
2987
  const accountExist = accounts.find(
2984
- (account) => account.providerId === providerId && account.accountId === accountId
2988
+ (account) => accountId ? account.accountId === accountId && account.providerId === providerId : account.providerId === providerId
2985
2989
  );
2986
2990
  if (!accountExist) {
2987
2991
  throw new APIError("BAD_REQUEST", {
2988
2992
  message: BASE_ERROR_CODES.ACCOUNT_NOT_FOUND
2989
2993
  });
2990
2994
  }
2991
- if (accounts.length === 1 && !ctx.context.options.account?.accountLinking?.allowUnlinkingAll) {
2992
- throw new APIError("BAD_REQUEST", {
2993
- message: BASE_ERROR_CODES.FAILED_TO_UNLINK_LAST_ACCOUNT
2994
- });
2995
- }
2996
2995
  await ctx.context.internalAdapter.deleteAccount(accountExist.id);
2997
2996
  return ctx.json({
2998
2997
  status: true
@@ -1,6 +1,6 @@
1
1
  import { APIError } from 'better-call';
2
2
  import { z } from 'zod';
3
- import { c as createAuthMiddleware, s as sessionMiddleware, a as createAuthEndpoint, g as getSessionFromCtx, B as BASE_ERROR_CODES, M as requestOnlySessionMiddleware } from './better-auth.vdKrG2Zp.mjs';
3
+ import { c as createAuthMiddleware, s as sessionMiddleware, a as createAuthEndpoint, g as getSessionFromCtx, B as BASE_ERROR_CODES, M as requestOnlySessionMiddleware } from './better-auth.73eFuzj6.mjs';
4
4
  import './better-auth.8zoxzg-F.mjs';
5
5
  import '@better-auth/utils/base64';
6
6
  import '@better-auth/utils/hmac';
@@ -377,8 +377,7 @@ const getOrgAdapter = (context, options) => {
377
377
  field: "userId",
378
378
  value: userId
379
379
  }
380
- ],
381
- limit: options?.membershipLimit || 100
380
+ ]
382
381
  });
383
382
  if (!members || members.length === 0) {
384
383
  return [];
@@ -2,7 +2,7 @@
2
2
 
3
3
  const betterCall = require('better-call');
4
4
  const zod = require('zod');
5
- const account = require('./better-auth.ChassmKE.cjs');
5
+ const account = require('./better-auth.UNIWw9Sf.cjs');
6
6
  require('./better-auth.DiSjtgs9.cjs');
7
7
  require('@better-auth/utils/base64');
8
8
  require('@better-auth/utils/hmac');
@@ -379,8 +379,7 @@ const getOrgAdapter = (context, options) => {
379
379
  field: "userId",
380
380
  value: userId
381
381
  }
382
- ],
383
- limit: options?.membershipLimit || 100
382
+ ]
384
383
  });
385
384
  if (!members || members.length === 0) {
386
385
  return [];
@@ -1,7 +1,7 @@
1
1
  import * as zod from 'zod';
2
2
  import * as better_call from 'better-call';
3
- import { G as GenericEndpointContext, I as InferOptionSchema, H as HookEndpointContext, l as AuthContext } from './better-auth.BODzPfJo.js';
4
- import { Statements } from '../plugins/access/index.js';
3
+ import { G as GenericEndpointContext, I as InferOptionSchema, H as HookEndpointContext, l as AuthContext } from './better-auth.Ci5pgoju.mjs';
4
+ import { Statements } from '../plugins/access/index.mjs';
5
5
 
6
6
  declare const apiKeySchema: ({ timeWindow, rateLimitMax, }: {
7
7
  timeWindow: number;
@@ -1,5 +1,5 @@
1
1
  import { APIError } from 'better-call';
2
- import { c as createAuthMiddleware, g as getSessionFromCtx } from './better-auth.vdKrG2Zp.mjs';
2
+ import { c as createAuthMiddleware, g as getSessionFromCtx } from './better-auth.73eFuzj6.mjs';
3
3
  import { setSessionCookie } from '../cookies/index.mjs';
4
4
  import { z } from 'zod';
5
5
  import './better-auth.CepcSj5H.mjs';
@@ -2,7 +2,7 @@
2
2
 
3
3
  const zod = require('zod');
4
4
  const betterCall = require('better-call');
5
- const account = require('./better-auth.ChassmKE.cjs');
5
+ const account = require('./better-auth.UNIWw9Sf.cjs');
6
6
  const cookies_index = require('../cookies/index.cjs');
7
7
  const schema$1 = require('./better-auth.C5H9XEzZ.cjs');
8
8
  require('./better-auth.DiSjtgs9.cjs');
@@ -1,4 +1,4 @@
1
- import { G as GenericEndpointContext } from './better-auth.BODzPfJo.js';
1
+ import { G as GenericEndpointContext } from './better-auth.DPgLMy-i.js';
2
2
 
3
3
  declare function generateState(c: GenericEndpointContext, link?: {
4
4
  email: string;
@@ -5645,13 +5645,13 @@ declare const unlinkAccount: {
5645
5645
  method: "POST";
5646
5646
  body: z.ZodObject<{
5647
5647
  providerId: z.ZodString;
5648
- accountId: z.ZodString;
5648
+ accountId: z.ZodOptional<z.ZodString>;
5649
5649
  }, "strip", z.ZodTypeAny, {
5650
5650
  providerId: string;
5651
- accountId: string;
5651
+ accountId?: string | undefined;
5652
5652
  }, {
5653
5653
  providerId: string;
5654
- accountId: string;
5654
+ accountId?: string | undefined;
5655
5655
  }>;
5656
5656
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
5657
5657
  session: {
@@ -5694,13 +5694,13 @@ declare const unlinkAccount: {
5694
5694
  method: "POST";
5695
5695
  body: z.ZodObject<{
5696
5696
  providerId: z.ZodString;
5697
- accountId: z.ZodString;
5697
+ accountId: z.ZodOptional<z.ZodString>;
5698
5698
  }, "strip", z.ZodTypeAny, {
5699
5699
  providerId: string;
5700
- accountId: string;
5700
+ accountId?: string | undefined;
5701
5701
  }, {
5702
5702
  providerId: string;
5703
- accountId: string;
5703
+ accountId?: string | undefined;
5704
5704
  }>;
5705
5705
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
5706
5706
  session: {
@@ -9167,13 +9167,13 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
9167
9167
  method: "POST";
9168
9168
  body: zod.ZodObject<{
9169
9169
  providerId: zod.ZodString;
9170
- accountId: zod.ZodString;
9170
+ accountId: zod.ZodOptional<zod.ZodString>;
9171
9171
  }, "strip", zod.ZodTypeAny, {
9172
9172
  providerId: string;
9173
- accountId: string;
9173
+ accountId?: string | undefined;
9174
9174
  }, {
9175
9175
  providerId: string;
9176
- accountId: string;
9176
+ accountId?: string | undefined;
9177
9177
  }>;
9178
9178
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
9179
9179
  session: {
@@ -9216,13 +9216,13 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
9216
9216
  method: "POST";
9217
9217
  body: zod.ZodObject<{
9218
9218
  providerId: zod.ZodString;
9219
- accountId: zod.ZodString;
9219
+ accountId: zod.ZodOptional<zod.ZodString>;
9220
9220
  }, "strip", zod.ZodTypeAny, {
9221
9221
  providerId: string;
9222
- accountId: string;
9222
+ accountId?: string | undefined;
9223
9223
  }, {
9224
9224
  providerId: string;
9225
- accountId: string;
9225
+ accountId?: string | undefined;
9226
9226
  }>;
9227
9227
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
9228
9228
  session: {
@@ -12690,13 +12690,13 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
12690
12690
  method: "POST";
12691
12691
  body: zod.ZodObject<{
12692
12692
  providerId: zod.ZodString;
12693
- accountId: zod.ZodString;
12693
+ accountId: zod.ZodOptional<zod.ZodString>;
12694
12694
  }, "strip", zod.ZodTypeAny, {
12695
12695
  providerId: string;
12696
- accountId: string;
12696
+ accountId?: string | undefined;
12697
12697
  }, {
12698
12698
  providerId: string;
12699
- accountId: string;
12699
+ accountId?: string | undefined;
12700
12700
  }>;
12701
12701
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
12702
12702
  session: {
@@ -12739,13 +12739,13 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
12739
12739
  method: "POST";
12740
12740
  body: zod.ZodObject<{
12741
12741
  providerId: zod.ZodString;
12742
- accountId: zod.ZodString;
12742
+ accountId: zod.ZodOptional<zod.ZodString>;
12743
12743
  }, "strip", zod.ZodTypeAny, {
12744
12744
  providerId: string;
12745
- accountId: string;
12745
+ accountId?: string | undefined;
12746
12746
  }, {
12747
12747
  providerId: string;
12748
- accountId: string;
12748
+ accountId?: string | undefined;
12749
12749
  }>;
12750
12750
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
12751
12751
  session: {
@@ -16237,13 +16237,13 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
16237
16237
  method: "POST";
16238
16238
  body: zod.ZodObject<{
16239
16239
  providerId: zod.ZodString;
16240
- accountId: zod.ZodString;
16240
+ accountId: zod.ZodOptional<zod.ZodString>;
16241
16241
  }, "strip", zod.ZodTypeAny, {
16242
16242
  providerId: string;
16243
- accountId: string;
16243
+ accountId?: string | undefined;
16244
16244
  }, {
16245
16245
  providerId: string;
16246
- accountId: string;
16246
+ accountId?: string | undefined;
16247
16247
  }>;
16248
16248
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
16249
16249
  session: {
@@ -16286,13 +16286,13 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
16286
16286
  method: "POST";
16287
16287
  body: zod.ZodObject<{
16288
16288
  providerId: zod.ZodString;
16289
- accountId: zod.ZodString;
16289
+ accountId: zod.ZodOptional<zod.ZodString>;
16290
16290
  }, "strip", zod.ZodTypeAny, {
16291
16291
  providerId: string;
16292
- accountId: string;
16292
+ accountId?: string | undefined;
16293
16293
  }, {
16294
16294
  providerId: string;
16295
- accountId: string;
16295
+ accountId?: string | undefined;
16296
16296
  }>;
16297
16297
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
16298
16298
  session: {
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { APIError } from 'better-call';
3
- import { c as createAuthMiddleware, g as getSessionFromCtx, a as createAuthEndpoint } from './better-auth.vdKrG2Zp.mjs';
3
+ import { c as createAuthMiddleware, g as getSessionFromCtx, a as createAuthEndpoint } from './better-auth.73eFuzj6.mjs';
4
4
  import { setSessionCookie, deleteSessionCookie } from '../cookies/index.mjs';
5
5
  import { m as mergeSchema } from './better-auth.CepcSj5H.mjs';
6
6
  import './better-auth.8zoxzg-F.mjs';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const betterCall = require('better-call');
4
- const account = require('./better-auth.ChassmKE.cjs');
4
+ const account = require('./better-auth.UNIWw9Sf.cjs');
5
5
  const cookies_index = require('../cookies/index.cjs');
6
6
  const zod = require('zod');
7
7
  require('./better-auth.C5H9XEzZ.cjs');
@@ -5645,13 +5645,13 @@ declare const unlinkAccount: {
5645
5645
  method: "POST";
5646
5646
  body: z.ZodObject<{
5647
5647
  providerId: z.ZodString;
5648
- accountId: z.ZodString;
5648
+ accountId: z.ZodOptional<z.ZodString>;
5649
5649
  }, "strip", z.ZodTypeAny, {
5650
5650
  providerId: string;
5651
- accountId: string;
5651
+ accountId?: string | undefined;
5652
5652
  }, {
5653
5653
  providerId: string;
5654
- accountId: string;
5654
+ accountId?: string | undefined;
5655
5655
  }>;
5656
5656
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
5657
5657
  session: {
@@ -5694,13 +5694,13 @@ declare const unlinkAccount: {
5694
5694
  method: "POST";
5695
5695
  body: z.ZodObject<{
5696
5696
  providerId: z.ZodString;
5697
- accountId: z.ZodString;
5697
+ accountId: z.ZodOptional<z.ZodString>;
5698
5698
  }, "strip", z.ZodTypeAny, {
5699
5699
  providerId: string;
5700
- accountId: string;
5700
+ accountId?: string | undefined;
5701
5701
  }, {
5702
5702
  providerId: string;
5703
- accountId: string;
5703
+ accountId?: string | undefined;
5704
5704
  }>;
5705
5705
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
5706
5706
  session: {
@@ -9167,13 +9167,13 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
9167
9167
  method: "POST";
9168
9168
  body: zod.ZodObject<{
9169
9169
  providerId: zod.ZodString;
9170
- accountId: zod.ZodString;
9170
+ accountId: zod.ZodOptional<zod.ZodString>;
9171
9171
  }, "strip", zod.ZodTypeAny, {
9172
9172
  providerId: string;
9173
- accountId: string;
9173
+ accountId?: string | undefined;
9174
9174
  }, {
9175
9175
  providerId: string;
9176
- accountId: string;
9176
+ accountId?: string | undefined;
9177
9177
  }>;
9178
9178
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
9179
9179
  session: {
@@ -9216,13 +9216,13 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
9216
9216
  method: "POST";
9217
9217
  body: zod.ZodObject<{
9218
9218
  providerId: zod.ZodString;
9219
- accountId: zod.ZodString;
9219
+ accountId: zod.ZodOptional<zod.ZodString>;
9220
9220
  }, "strip", zod.ZodTypeAny, {
9221
9221
  providerId: string;
9222
- accountId: string;
9222
+ accountId?: string | undefined;
9223
9223
  }, {
9224
9224
  providerId: string;
9225
- accountId: string;
9225
+ accountId?: string | undefined;
9226
9226
  }>;
9227
9227
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
9228
9228
  session: {
@@ -12690,13 +12690,13 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
12690
12690
  method: "POST";
12691
12691
  body: zod.ZodObject<{
12692
12692
  providerId: zod.ZodString;
12693
- accountId: zod.ZodString;
12693
+ accountId: zod.ZodOptional<zod.ZodString>;
12694
12694
  }, "strip", zod.ZodTypeAny, {
12695
12695
  providerId: string;
12696
- accountId: string;
12696
+ accountId?: string | undefined;
12697
12697
  }, {
12698
12698
  providerId: string;
12699
- accountId: string;
12699
+ accountId?: string | undefined;
12700
12700
  }>;
12701
12701
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
12702
12702
  session: {
@@ -12739,13 +12739,13 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
12739
12739
  method: "POST";
12740
12740
  body: zod.ZodObject<{
12741
12741
  providerId: zod.ZodString;
12742
- accountId: zod.ZodString;
12742
+ accountId: zod.ZodOptional<zod.ZodString>;
12743
12743
  }, "strip", zod.ZodTypeAny, {
12744
12744
  providerId: string;
12745
- accountId: string;
12745
+ accountId?: string | undefined;
12746
12746
  }, {
12747
12747
  providerId: string;
12748
- accountId: string;
12748
+ accountId?: string | undefined;
12749
12749
  }>;
12750
12750
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
12751
12751
  session: {
@@ -16237,13 +16237,13 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
16237
16237
  method: "POST";
16238
16238
  body: zod.ZodObject<{
16239
16239
  providerId: zod.ZodString;
16240
- accountId: zod.ZodString;
16240
+ accountId: zod.ZodOptional<zod.ZodString>;
16241
16241
  }, "strip", zod.ZodTypeAny, {
16242
16242
  providerId: string;
16243
- accountId: string;
16243
+ accountId?: string | undefined;
16244
16244
  }, {
16245
16245
  providerId: string;
16246
- accountId: string;
16246
+ accountId?: string | undefined;
16247
16247
  }>;
16248
16248
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
16249
16249
  session: {
@@ -16286,13 +16286,13 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
16286
16286
  method: "POST";
16287
16287
  body: zod.ZodObject<{
16288
16288
  providerId: zod.ZodString;
16289
- accountId: zod.ZodString;
16289
+ accountId: zod.ZodOptional<zod.ZodString>;
16290
16290
  }, "strip", zod.ZodTypeAny, {
16291
16291
  providerId: string;
16292
- accountId: string;
16292
+ accountId?: string | undefined;
16293
16293
  }, {
16294
16294
  providerId: string;
16295
- accountId: string;
16295
+ accountId?: string | undefined;
16296
16296
  }>;
16297
16297
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
16298
16298
  session: {
@@ -1,4 +1,4 @@
1
- import { G as GenericEndpointContext } from './better-auth.D_6ikAPh.mjs';
1
+ import { G as GenericEndpointContext } from './better-auth.Ci5pgoju.mjs';
2
2
 
3
3
  declare function generateState(c: GenericEndpointContext, link?: {
4
4
  email: string;
@@ -1,6 +1,6 @@
1
1
  import * as zod from 'zod';
2
2
  import * as better_call from 'better-call';
3
- import { G as GenericEndpointContext, I as InferOptionSchema, H as HookEndpointContext, l as AuthContext } from './better-auth.BkL9ntGY.cjs';
3
+ import { G as GenericEndpointContext, I as InferOptionSchema, H as HookEndpointContext, l as AuthContext } from './better-auth.feQWZZzF.cjs';
4
4
  import { Statements } from '../plugins/access/index.cjs';
5
5
 
6
6
  declare const apiKeySchema: ({ timeWindow, rateLimitMax, }: {
@@ -1,4 +1,4 @@
1
- import { G as GenericEndpointContext } from './better-auth.BkL9ntGY.cjs';
1
+ import { G as GenericEndpointContext } from './better-auth.feQWZZzF.cjs';
2
2
 
3
3
  declare function generateState(c: GenericEndpointContext, link?: {
4
4
  email: string;
@@ -2972,8 +2972,7 @@ const unlinkAccount = createAuthEndpoint(
2972
2972
  method: "POST",
2973
2973
  body: zod.z.object({
2974
2974
  providerId: zod.z.string(),
2975
- accountId: zod.z.string()
2976
- // Add account ID to identify which account to unlink
2975
+ accountId: zod.z.string().optional()
2977
2976
  }),
2978
2977
  use: [freshSessionMiddleware]
2979
2978
  },
@@ -2982,19 +2981,19 @@ const unlinkAccount = createAuthEndpoint(
2982
2981
  const accounts = await ctx.context.internalAdapter.findAccounts(
2983
2982
  ctx.context.session.user.id
2984
2983
  );
2984
+ if (accounts.length === 1 && !ctx.context.options.account?.accountLinking?.allowUnlinkingAll) {
2985
+ throw new betterCall.APIError("BAD_REQUEST", {
2986
+ message: BASE_ERROR_CODES.FAILED_TO_UNLINK_LAST_ACCOUNT
2987
+ });
2988
+ }
2985
2989
  const accountExist = accounts.find(
2986
- (account) => account.providerId === providerId && account.accountId === accountId
2990
+ (account) => accountId ? account.accountId === accountId && account.providerId === providerId : account.providerId === providerId
2987
2991
  );
2988
2992
  if (!accountExist) {
2989
2993
  throw new betterCall.APIError("BAD_REQUEST", {
2990
2994
  message: BASE_ERROR_CODES.ACCOUNT_NOT_FOUND
2991
2995
  });
2992
2996
  }
2993
- if (accounts.length === 1 && !ctx.context.options.account?.accountLinking?.allowUnlinkingAll) {
2994
- throw new betterCall.APIError("BAD_REQUEST", {
2995
- message: BASE_ERROR_CODES.FAILED_TO_UNLINK_LAST_ACCOUNT
2996
- });
2997
- }
2998
2997
  await ctx.context.internalAdapter.deleteAccount(accountExist.id);
2999
2998
  return ctx.json({
3000
2999
  status: true
@@ -5645,13 +5645,13 @@ declare const unlinkAccount: {
5645
5645
  method: "POST";
5646
5646
  body: z.ZodObject<{
5647
5647
  providerId: z.ZodString;
5648
- accountId: z.ZodString;
5648
+ accountId: z.ZodOptional<z.ZodString>;
5649
5649
  }, "strip", z.ZodTypeAny, {
5650
5650
  providerId: string;
5651
- accountId: string;
5651
+ accountId?: string | undefined;
5652
5652
  }, {
5653
5653
  providerId: string;
5654
- accountId: string;
5654
+ accountId?: string | undefined;
5655
5655
  }>;
5656
5656
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
5657
5657
  session: {
@@ -5694,13 +5694,13 @@ declare const unlinkAccount: {
5694
5694
  method: "POST";
5695
5695
  body: z.ZodObject<{
5696
5696
  providerId: z.ZodString;
5697
- accountId: z.ZodString;
5697
+ accountId: z.ZodOptional<z.ZodString>;
5698
5698
  }, "strip", z.ZodTypeAny, {
5699
5699
  providerId: string;
5700
- accountId: string;
5700
+ accountId?: string | undefined;
5701
5701
  }, {
5702
5702
  providerId: string;
5703
- accountId: string;
5703
+ accountId?: string | undefined;
5704
5704
  }>;
5705
5705
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
5706
5706
  session: {
@@ -9167,13 +9167,13 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
9167
9167
  method: "POST";
9168
9168
  body: zod.ZodObject<{
9169
9169
  providerId: zod.ZodString;
9170
- accountId: zod.ZodString;
9170
+ accountId: zod.ZodOptional<zod.ZodString>;
9171
9171
  }, "strip", zod.ZodTypeAny, {
9172
9172
  providerId: string;
9173
- accountId: string;
9173
+ accountId?: string | undefined;
9174
9174
  }, {
9175
9175
  providerId: string;
9176
- accountId: string;
9176
+ accountId?: string | undefined;
9177
9177
  }>;
9178
9178
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
9179
9179
  session: {
@@ -9216,13 +9216,13 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
9216
9216
  method: "POST";
9217
9217
  body: zod.ZodObject<{
9218
9218
  providerId: zod.ZodString;
9219
- accountId: zod.ZodString;
9219
+ accountId: zod.ZodOptional<zod.ZodString>;
9220
9220
  }, "strip", zod.ZodTypeAny, {
9221
9221
  providerId: string;
9222
- accountId: string;
9222
+ accountId?: string | undefined;
9223
9223
  }, {
9224
9224
  providerId: string;
9225
- accountId: string;
9225
+ accountId?: string | undefined;
9226
9226
  }>;
9227
9227
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
9228
9228
  session: {
@@ -12690,13 +12690,13 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
12690
12690
  method: "POST";
12691
12691
  body: zod.ZodObject<{
12692
12692
  providerId: zod.ZodString;
12693
- accountId: zod.ZodString;
12693
+ accountId: zod.ZodOptional<zod.ZodString>;
12694
12694
  }, "strip", zod.ZodTypeAny, {
12695
12695
  providerId: string;
12696
- accountId: string;
12696
+ accountId?: string | undefined;
12697
12697
  }, {
12698
12698
  providerId: string;
12699
- accountId: string;
12699
+ accountId?: string | undefined;
12700
12700
  }>;
12701
12701
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
12702
12702
  session: {
@@ -12739,13 +12739,13 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
12739
12739
  method: "POST";
12740
12740
  body: zod.ZodObject<{
12741
12741
  providerId: zod.ZodString;
12742
- accountId: zod.ZodString;
12742
+ accountId: zod.ZodOptional<zod.ZodString>;
12743
12743
  }, "strip", zod.ZodTypeAny, {
12744
12744
  providerId: string;
12745
- accountId: string;
12745
+ accountId?: string | undefined;
12746
12746
  }, {
12747
12747
  providerId: string;
12748
- accountId: string;
12748
+ accountId?: string | undefined;
12749
12749
  }>;
12750
12750
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
12751
12751
  session: {
@@ -16237,13 +16237,13 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
16237
16237
  method: "POST";
16238
16238
  body: zod.ZodObject<{
16239
16239
  providerId: zod.ZodString;
16240
- accountId: zod.ZodString;
16240
+ accountId: zod.ZodOptional<zod.ZodString>;
16241
16241
  }, "strip", zod.ZodTypeAny, {
16242
16242
  providerId: string;
16243
- accountId: string;
16243
+ accountId?: string | undefined;
16244
16244
  }, {
16245
16245
  providerId: string;
16246
- accountId: string;
16246
+ accountId?: string | undefined;
16247
16247
  }>;
16248
16248
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
16249
16249
  session: {
@@ -16286,13 +16286,13 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
16286
16286
  method: "POST";
16287
16287
  body: zod.ZodObject<{
16288
16288
  providerId: zod.ZodString;
16289
- accountId: zod.ZodString;
16289
+ accountId: zod.ZodOptional<zod.ZodString>;
16290
16290
  }, "strip", zod.ZodTypeAny, {
16291
16291
  providerId: string;
16292
- accountId: string;
16292
+ accountId?: string | undefined;
16293
16293
  }, {
16294
16294
  providerId: string;
16295
- accountId: string;
16295
+ accountId?: string | undefined;
16296
16296
  }>;
16297
16297
  use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
16298
16298
  session: {
@@ -1,5 +1,5 @@
1
- import { B as BetterAuthPlugin, a3 as InferFieldsInputClient, a1 as InferFieldsOutput, U as User, S as Session, i as Auth } from '../shared/better-auth.BkL9ntGY.cjs';
2
- export { u as Account, g as Adapter, x as AdapterInstance, w as AdapterSchemaCreation, r as AdditionalSessionFieldsInput, s as AdditionalSessionFieldsOutput, p as AdditionalUserFieldsInput, q as AdditionalUserFieldsOutput, l as AuthContext, A as AuthPluginSchema, f as BetterAuthOptions, z as FilterActions, F as FilteredAPI, G as GenericEndpointContext, H as HookEndpointContext, D as InferAPI, I as InferOptionSchema, a as InferPluginErrorCodes, t as InferPluginTypes, k as InferSession, C as InferSessionAPI, j as InferUser, M as Models, R as RateLimit, y as SecondaryStorage, V as Verification, W as Where, v as init } from '../shared/better-auth.BkL9ntGY.cjs';
1
+ import { B as BetterAuthPlugin, a3 as InferFieldsInputClient, a1 as InferFieldsOutput, U as User, S as Session, i as Auth } from '../shared/better-auth.feQWZZzF.cjs';
2
+ export { u as Account, g as Adapter, x as AdapterInstance, w as AdapterSchemaCreation, r as AdditionalSessionFieldsInput, s as AdditionalSessionFieldsOutput, p as AdditionalUserFieldsInput, q as AdditionalUserFieldsOutput, l as AuthContext, A as AuthPluginSchema, f as BetterAuthOptions, z as FilterActions, F as FilteredAPI, G as GenericEndpointContext, H as HookEndpointContext, D as InferAPI, I as InferOptionSchema, a as InferPluginErrorCodes, t as InferPluginTypes, k as InferSession, C as InferSessionAPI, j as InferUser, M as Models, R as RateLimit, y as SecondaryStorage, V as Verification, W as Where, v as init } from '../shared/better-auth.feQWZZzF.cjs';
3
3
  import { BetterFetchOption, BetterFetchResponse, BetterFetch, BetterFetchPlugin } from '@better-fetch/fetch';
4
4
  import { WritableAtom, Atom } from 'nanostores';
5
5
  import { U as UnionToIntersection, H as HasRequiredKeys, b as Prettify, L as LiteralString, S as StripEmptyObjects } from '../shared/better-auth.Bi8FQwDD.cjs';
@@ -1,5 +1,5 @@
1
- import { B as BetterAuthPlugin, a3 as InferFieldsInputClient, a1 as InferFieldsOutput, U as User, S as Session, i as Auth } from '../shared/better-auth.D_6ikAPh.mjs';
2
- export { u as Account, g as Adapter, x as AdapterInstance, w as AdapterSchemaCreation, r as AdditionalSessionFieldsInput, s as AdditionalSessionFieldsOutput, p as AdditionalUserFieldsInput, q as AdditionalUserFieldsOutput, l as AuthContext, A as AuthPluginSchema, f as BetterAuthOptions, z as FilterActions, F as FilteredAPI, G as GenericEndpointContext, H as HookEndpointContext, D as InferAPI, I as InferOptionSchema, a as InferPluginErrorCodes, t as InferPluginTypes, k as InferSession, C as InferSessionAPI, j as InferUser, M as Models, R as RateLimit, y as SecondaryStorage, V as Verification, W as Where, v as init } from '../shared/better-auth.D_6ikAPh.mjs';
1
+ import { B as BetterAuthPlugin, a3 as InferFieldsInputClient, a1 as InferFieldsOutput, U as User, S as Session, i as Auth } from '../shared/better-auth.Ci5pgoju.mjs';
2
+ export { u as Account, g as Adapter, x as AdapterInstance, w as AdapterSchemaCreation, r as AdditionalSessionFieldsInput, s as AdditionalSessionFieldsOutput, p as AdditionalUserFieldsInput, q as AdditionalUserFieldsOutput, l as AuthContext, A as AuthPluginSchema, f as BetterAuthOptions, z as FilterActions, F as FilteredAPI, G as GenericEndpointContext, H as HookEndpointContext, D as InferAPI, I as InferOptionSchema, a as InferPluginErrorCodes, t as InferPluginTypes, k as InferSession, C as InferSessionAPI, j as InferUser, M as Models, R as RateLimit, y as SecondaryStorage, V as Verification, W as Where, v as init } from '../shared/better-auth.Ci5pgoju.mjs';
3
3
  import { BetterFetchOption, BetterFetchResponse, BetterFetch, BetterFetchPlugin } from '@better-fetch/fetch';
4
4
  import { WritableAtom, Atom } from 'nanostores';
5
5
  import { U as UnionToIntersection, H as HasRequiredKeys, b as Prettify, L as LiteralString, S as StripEmptyObjects } from '../shared/better-auth.Bi8FQwDD.mjs';
@@ -1,5 +1,5 @@
1
- import { B as BetterAuthPlugin, a3 as InferFieldsInputClient, a1 as InferFieldsOutput, U as User, S as Session, i as Auth } from '../shared/better-auth.BODzPfJo.js';
2
- export { u as Account, g as Adapter, x as AdapterInstance, w as AdapterSchemaCreation, r as AdditionalSessionFieldsInput, s as AdditionalSessionFieldsOutput, p as AdditionalUserFieldsInput, q as AdditionalUserFieldsOutput, l as AuthContext, A as AuthPluginSchema, f as BetterAuthOptions, z as FilterActions, F as FilteredAPI, G as GenericEndpointContext, H as HookEndpointContext, D as InferAPI, I as InferOptionSchema, a as InferPluginErrorCodes, t as InferPluginTypes, k as InferSession, C as InferSessionAPI, j as InferUser, M as Models, R as RateLimit, y as SecondaryStorage, V as Verification, W as Where, v as init } from '../shared/better-auth.BODzPfJo.js';
1
+ import { B as BetterAuthPlugin, a3 as InferFieldsInputClient, a1 as InferFieldsOutput, U as User, S as Session, i as Auth } from '../shared/better-auth.DPgLMy-i.js';
2
+ export { u as Account, g as Adapter, x as AdapterInstance, w as AdapterSchemaCreation, r as AdditionalSessionFieldsInput, s as AdditionalSessionFieldsOutput, p as AdditionalUserFieldsInput, q as AdditionalUserFieldsOutput, l as AuthContext, A as AuthPluginSchema, f as BetterAuthOptions, z as FilterActions, F as FilteredAPI, G as GenericEndpointContext, H as HookEndpointContext, D as InferAPI, I as InferOptionSchema, a as InferPluginErrorCodes, t as InferPluginTypes, k as InferSession, C as InferSessionAPI, j as InferUser, M as Models, R as RateLimit, y as SecondaryStorage, V as Verification, W as Where, v as init } from '../shared/better-auth.DPgLMy-i.js';
3
3
  import { BetterFetchOption, BetterFetchResponse, BetterFetch, BetterFetchPlugin } from '@better-fetch/fetch';
4
4
  import { WritableAtom, Atom } from 'nanostores';
5
5
  import { U as UnionToIntersection, H as HasRequiredKeys, b as Prettify, L as LiteralString, S as StripEmptyObjects } from '../shared/better-auth.Bi8FQwDD.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-auth",
3
- "version": "1.2.5-beta.7",
3
+ "version": "1.2.5-beta.8",
4
4
  "description": "The most comprehensive authentication library for TypeScript.",
5
5
  "type": "module",
6
6
  "repository": {