better-auth 1.2.5-beta.1 → 1.2.5-beta.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 (149) 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.d.cts +1 -1
  20. package/dist/api/index.d.mts +1 -1
  21. package/dist/api/index.d.ts +1 -1
  22. package/dist/client/index.d.cts +3 -2
  23. package/dist/client/index.d.mts +3 -2
  24. package/dist/client/index.d.ts +3 -2
  25. package/dist/client/plugins/index.d.cts +3 -3
  26. package/dist/client/plugins/index.d.mts +3 -3
  27. package/dist/client/plugins/index.d.ts +3 -3
  28. package/dist/client/react/index.d.cts +2 -1
  29. package/dist/client/react/index.d.mts +2 -1
  30. package/dist/client/react/index.d.ts +2 -1
  31. package/dist/client/solid/index.d.cts +2 -2
  32. package/dist/client/solid/index.d.mts +2 -2
  33. package/dist/client/solid/index.d.ts +2 -2
  34. package/dist/client/svelte/index.d.cts +2 -1
  35. package/dist/client/svelte/index.d.mts +2 -1
  36. package/dist/client/svelte/index.d.ts +2 -1
  37. package/dist/client/vue/index.d.cts +2 -1
  38. package/dist/client/vue/index.d.mts +2 -1
  39. package/dist/client/vue/index.d.ts +2 -1
  40. package/dist/cookies/index.cjs +13 -3
  41. package/dist/cookies/index.d.cts +1 -1
  42. package/dist/cookies/index.d.mts +1 -1
  43. package/dist/cookies/index.d.ts +1 -1
  44. package/dist/cookies/index.mjs +13 -3
  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.d.cts +2 -2
  49. package/dist/index.d.mts +2 -2
  50. package/dist/index.d.ts +2 -2
  51. package/dist/integrations/next-js.cjs +1 -1
  52. package/dist/integrations/next-js.d.cts +1 -1
  53. package/dist/integrations/next-js.d.mts +1 -1
  54. package/dist/integrations/next-js.d.ts +1 -1
  55. package/dist/integrations/next-js.mjs +1 -1
  56. package/dist/integrations/node.d.cts +1 -1
  57. package/dist/integrations/node.d.mts +1 -1
  58. package/dist/integrations/node.d.ts +1 -1
  59. package/dist/integrations/svelte-kit.d.cts +1 -1
  60. package/dist/integrations/svelte-kit.d.mts +1 -1
  61. package/dist/integrations/svelte-kit.d.ts +1 -1
  62. package/dist/oauth2/index.d.cts +2 -2
  63. package/dist/oauth2/index.d.mts +2 -2
  64. package/dist/oauth2/index.d.ts +2 -2
  65. package/dist/plugins/admin/index.cjs +2 -2
  66. package/dist/plugins/admin/index.d.cts +5 -19
  67. package/dist/plugins/admin/index.d.mts +5 -19
  68. package/dist/plugins/admin/index.d.ts +5 -19
  69. package/dist/plugins/admin/index.mjs +2 -2
  70. package/dist/plugins/anonymous/index.d.cts +1 -1
  71. package/dist/plugins/anonymous/index.d.mts +1 -1
  72. package/dist/plugins/anonymous/index.d.ts +1 -1
  73. package/dist/plugins/bearer/index.cjs +1 -1
  74. package/dist/plugins/bearer/index.d.cts +1 -1
  75. package/dist/plugins/bearer/index.d.mts +1 -1
  76. package/dist/plugins/bearer/index.d.ts +1 -1
  77. package/dist/plugins/bearer/index.mjs +1 -1
  78. package/dist/plugins/custom-session/index.cjs +1 -1
  79. package/dist/plugins/custom-session/index.d.cts +1 -1
  80. package/dist/plugins/custom-session/index.d.mts +1 -1
  81. package/dist/plugins/custom-session/index.d.ts +1 -1
  82. package/dist/plugins/custom-session/index.mjs +1 -1
  83. package/dist/plugins/email-otp/index.d.cts +1 -1
  84. package/dist/plugins/email-otp/index.d.mts +1 -1
  85. package/dist/plugins/email-otp/index.d.ts +1 -1
  86. package/dist/plugins/generic-oauth/index.d.cts +1 -1
  87. package/dist/plugins/generic-oauth/index.d.mts +1 -1
  88. package/dist/plugins/generic-oauth/index.d.ts +1 -1
  89. package/dist/plugins/index.cjs +2 -2
  90. package/dist/plugins/index.d.cts +4 -4
  91. package/dist/plugins/index.d.mts +4 -4
  92. package/dist/plugins/index.d.ts +4 -4
  93. package/dist/plugins/index.mjs +2 -2
  94. package/dist/plugins/jwt/index.cjs +1 -1
  95. package/dist/plugins/jwt/index.d.cts +1 -1
  96. package/dist/plugins/jwt/index.d.mts +1 -1
  97. package/dist/plugins/jwt/index.d.ts +1 -1
  98. package/dist/plugins/jwt/index.mjs +1 -1
  99. package/dist/plugins/multi-session/index.d.cts +1 -1
  100. package/dist/plugins/multi-session/index.d.mts +1 -1
  101. package/dist/plugins/multi-session/index.d.ts +1 -1
  102. package/dist/plugins/oauth-proxy/index.cjs +1 -1
  103. package/dist/plugins/oauth-proxy/index.d.cts +1 -1
  104. package/dist/plugins/oauth-proxy/index.d.mts +1 -1
  105. package/dist/plugins/oauth-proxy/index.d.ts +1 -1
  106. package/dist/plugins/oauth-proxy/index.mjs +1 -1
  107. package/dist/plugins/open-api/index.cjs +1 -1
  108. package/dist/plugins/open-api/index.d.cts +1 -1
  109. package/dist/plugins/open-api/index.d.mts +1 -1
  110. package/dist/plugins/open-api/index.d.ts +1 -1
  111. package/dist/plugins/open-api/index.mjs +1 -1
  112. package/dist/plugins/organization/index.cjs +1 -1
  113. package/dist/plugins/organization/index.d.cts +8709 -7
  114. package/dist/plugins/organization/index.d.mts +8709 -7
  115. package/dist/plugins/organization/index.d.ts +8709 -7
  116. package/dist/plugins/organization/index.mjs +1 -1
  117. package/dist/plugins/passkey/index.d.cts +1 -1
  118. package/dist/plugins/passkey/index.d.mts +1 -1
  119. package/dist/plugins/passkey/index.d.ts +1 -1
  120. package/dist/plugins/phone-number/index.d.cts +1 -1
  121. package/dist/plugins/phone-number/index.d.mts +1 -1
  122. package/dist/plugins/phone-number/index.d.ts +1 -1
  123. package/dist/plugins/sso/index.d.cts +1 -1
  124. package/dist/plugins/sso/index.d.mts +1 -1
  125. package/dist/plugins/sso/index.d.ts +1 -1
  126. package/dist/plugins/two-factor/index.d.cts +1 -1
  127. package/dist/plugins/two-factor/index.d.mts +1 -1
  128. package/dist/plugins/two-factor/index.d.ts +1 -1
  129. package/dist/plugins/username/index.d.cts +1 -1
  130. package/dist/plugins/username/index.d.mts +1 -1
  131. package/dist/plugins/username/index.d.ts +1 -1
  132. package/dist/shared/{better-auth.BAHeu7c0.d.cts → better-auth.3YmU0S1F.d.mts} +1 -1
  133. package/dist/shared/{better-auth.BChhyjyz.d.mts → better-auth.B63JbN8N.d.mts} +1 -1
  134. package/dist/shared/{better-auth.CJnNI_pZ.cjs → better-auth.BMszDvE7.cjs} +19 -15
  135. package/dist/shared/{better-auth.z5hCXEpq.d.ts → better-auth.BUgzWHv2.d.ts} +1 -0
  136. package/dist/shared/{better-auth.DOiM3a81.d.ts → better-auth.CnLcZivL.d.ts} +1 -1
  137. package/dist/shared/{better-auth.CIlYLU40.d.mts → better-auth.DAOwKIB1.d.cts} +1 -1
  138. package/dist/shared/{better-auth.mScwiXcw.d.cts → better-auth.Dxic9U80.d.cts} +1 -1
  139. package/dist/shared/{better-auth.Ce5ruaNV.d.cts → better-auth.EzTTQ-DT.d.cts} +1 -0
  140. package/dist/shared/{better-auth.Gg7Z0WyK.d.mts → better-auth.UmNSYtaE.d.mts} +1 -0
  141. package/dist/shared/{better-auth.C1nJLdAt.mjs → better-auth.r3dumB_s.mjs} +19 -15
  142. package/dist/shared/{better-auth.CgpkeCuV.d.ts → better-auth.zDOXHJ7C.d.ts} +1 -1
  143. package/dist/types/index.d.cts +2 -2
  144. package/dist/types/index.d.mts +2 -2
  145. package/dist/types/index.d.ts +2 -2
  146. package/package.json +1 -1
  147. package/dist/shared/better-auth.CDKE1pWJ.d.cts +0 -8697
  148. package/dist/shared/better-auth.CacwWJqS.d.ts +0 -8697
  149. package/dist/shared/better-auth.NTBHOnXV.d.mts +0 -8697
@@ -1,4 +1,4 @@
1
- import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.Ce5ruaNV.cjs';
1
+ import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.EzTTQ-DT.cjs';
2
2
  import '../../shared/better-auth.Bi8FQwDD.cjs';
3
3
  import 'zod';
4
4
  import 'kysely';
@@ -1,4 +1,4 @@
1
- import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.Gg7Z0WyK.mjs';
1
+ import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.UmNSYtaE.mjs';
2
2
  import '../../shared/better-auth.Bi8FQwDD.mjs';
3
3
  import 'zod';
4
4
  import 'kysely';
@@ -1,4 +1,4 @@
1
- import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.z5hCXEpq.js';
1
+ import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.BUgzWHv2.js';
2
2
  import '../../shared/better-auth.Bi8FQwDD.js';
3
3
  import 'zod';
4
4
  import 'kysely';
@@ -1,5 +1,5 @@
1
1
  import { Kysely } from 'kysely';
2
- import { f as BetterAuthOptions, K as KyselyDatabaseType, W as Where } from '../../shared/better-auth.Ce5ruaNV.cjs';
2
+ import { f as BetterAuthOptions, K as KyselyDatabaseType, W as Where } from '../../shared/better-auth.EzTTQ-DT.cjs';
3
3
  import '../../shared/better-auth.Bi8FQwDD.cjs';
4
4
  import 'zod';
5
5
  import 'better-call';
@@ -1,5 +1,5 @@
1
1
  import { Kysely } from 'kysely';
2
- import { f as BetterAuthOptions, K as KyselyDatabaseType, W as Where } from '../../shared/better-auth.Gg7Z0WyK.mjs';
2
+ import { f as BetterAuthOptions, K as KyselyDatabaseType, W as Where } from '../../shared/better-auth.UmNSYtaE.mjs';
3
3
  import '../../shared/better-auth.Bi8FQwDD.mjs';
4
4
  import 'zod';
5
5
  import 'better-call';
@@ -1,5 +1,5 @@
1
1
  import { Kysely } from 'kysely';
2
- import { f as BetterAuthOptions, K as KyselyDatabaseType, W as Where } from '../../shared/better-auth.z5hCXEpq.js';
2
+ import { f as BetterAuthOptions, K as KyselyDatabaseType, W as Where } from '../../shared/better-auth.BUgzWHv2.js';
3
3
  import '../../shared/better-auth.Bi8FQwDD.js';
4
4
  import 'zod';
5
5
  import 'better-call';
@@ -1,4 +1,4 @@
1
- import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.Ce5ruaNV.cjs';
1
+ import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.EzTTQ-DT.cjs';
2
2
  import '../../shared/better-auth.Bi8FQwDD.cjs';
3
3
  import 'zod';
4
4
  import 'kysely';
@@ -1,4 +1,4 @@
1
- import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.Gg7Z0WyK.mjs';
1
+ import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.UmNSYtaE.mjs';
2
2
  import '../../shared/better-auth.Bi8FQwDD.mjs';
3
3
  import 'zod';
4
4
  import 'kysely';
@@ -1,4 +1,4 @@
1
- import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.z5hCXEpq.js';
1
+ import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.BUgzWHv2.js';
2
2
  import '../../shared/better-auth.Bi8FQwDD.js';
3
3
  import 'zod';
4
4
  import 'kysely';
@@ -1,5 +1,5 @@
1
1
  import { Db } from 'mongodb';
2
- import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.Ce5ruaNV.cjs';
2
+ import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.EzTTQ-DT.cjs';
3
3
  import '../../shared/better-auth.Bi8FQwDD.cjs';
4
4
  import 'zod';
5
5
  import 'kysely';
@@ -1,5 +1,5 @@
1
1
  import { Db } from 'mongodb';
2
- import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.Gg7Z0WyK.mjs';
2
+ import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.UmNSYtaE.mjs';
3
3
  import '../../shared/better-auth.Bi8FQwDD.mjs';
4
4
  import 'zod';
5
5
  import 'kysely';
@@ -1,5 +1,5 @@
1
1
  import { Db } from 'mongodb';
2
- import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.z5hCXEpq.js';
2
+ import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.BUgzWHv2.js';
3
3
  import '../../shared/better-auth.Bi8FQwDD.js';
4
4
  import 'zod';
5
5
  import 'kysely';
@@ -1,4 +1,4 @@
1
- import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.Ce5ruaNV.cjs';
1
+ import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.EzTTQ-DT.cjs';
2
2
  import '../../shared/better-auth.Bi8FQwDD.cjs';
3
3
  import 'zod';
4
4
  import 'kysely';
@@ -1,4 +1,4 @@
1
- import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.Gg7Z0WyK.mjs';
1
+ import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.UmNSYtaE.mjs';
2
2
  import '../../shared/better-auth.Bi8FQwDD.mjs';
3
3
  import 'zod';
4
4
  import 'kysely';
@@ -1,4 +1,4 @@
1
- import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.z5hCXEpq.js';
1
+ import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.BUgzWHv2.js';
2
2
  import '../../shared/better-auth.Bi8FQwDD.js';
3
3
  import 'zod';
4
4
  import 'kysely';
@@ -1,4 +1,4 @@
1
- import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.Ce5ruaNV.cjs';
1
+ import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.EzTTQ-DT.cjs';
2
2
  import '../shared/better-auth.Bi8FQwDD.cjs';
3
3
  import 'zod';
4
4
  import 'kysely';
@@ -1,4 +1,4 @@
1
- import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.Gg7Z0WyK.mjs';
1
+ import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.UmNSYtaE.mjs';
2
2
  import '../shared/better-auth.Bi8FQwDD.mjs';
3
3
  import 'zod';
4
4
  import 'kysely';
@@ -1,4 +1,4 @@
1
- import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.z5hCXEpq.js';
1
+ import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.BUgzWHv2.js';
2
2
  import '../shared/better-auth.Bi8FQwDD.js';
3
3
  import 'zod';
4
4
  import 'kysely';
@@ -1,6 +1,6 @@
1
1
  import '../shared/better-auth.Bi8FQwDD.cjs';
2
2
  export { APIError } from 'better-call';
3
- export { d as AuthEndpoint, e as AuthMiddleware, aE as callbackOAuth, a$ as changeEmail, aX as changePassword, b as createAuthEndpoint, c as createAuthMiddleware, aS as createEmailVerificationToken, aZ as deleteUser, a_ as deleteUserCallback, b0 as error, aP as forgetPassword, aQ as forgetPasswordCallback, aJ as freshSessionMiddleware, aA as getEndpoints, aF as getSession, aG as getSessionFromCtx, b4 as linkSocialAccount, aK as listSessions, b3 as listUserAccounts, b1 as ok, o as optionsMiddleware, b7 as originCheck, b6 as originCheckMiddleware, aI as requestOnlySessionMiddleware, aR as resetPassword, aN as revokeOtherSessions, aL as revokeSession, aM as revokeSessions, aB as router, aU as sendVerificationEmail, aT as sendVerificationEmailFn, aH as sessionMiddleware, aY as setPassword, aD as signInEmail, aC as signInSocial, aO as signOut, b2 as signUpEmail, b5 as unlinkAccount, aW as updateUser, aV as verifyEmail } from '../shared/better-auth.Ce5ruaNV.cjs';
3
+ export { d as AuthEndpoint, e as AuthMiddleware, aE as callbackOAuth, a$ as changeEmail, aX as changePassword, b as createAuthEndpoint, c as createAuthMiddleware, aS as createEmailVerificationToken, aZ as deleteUser, a_ as deleteUserCallback, b0 as error, aP as forgetPassword, aQ as forgetPasswordCallback, aJ as freshSessionMiddleware, aA as getEndpoints, aF as getSession, aG as getSessionFromCtx, b4 as linkSocialAccount, aK as listSessions, b3 as listUserAccounts, b1 as ok, o as optionsMiddleware, b7 as originCheck, b6 as originCheckMiddleware, aI as requestOnlySessionMiddleware, aR as resetPassword, aN as revokeOtherSessions, aL as revokeSession, aM as revokeSessions, aB as router, aU as sendVerificationEmail, aT as sendVerificationEmailFn, aH as sessionMiddleware, aY as setPassword, aD as signInEmail, aC as signInSocial, aO as signOut, b2 as signUpEmail, b5 as unlinkAccount, aW as updateUser, aV as verifyEmail } from '../shared/better-auth.EzTTQ-DT.cjs';
4
4
  import 'zod';
5
5
  import 'kysely';
6
6
  import '../shared/better-auth.B36e4YUo.cjs';
@@ -1,6 +1,6 @@
1
1
  import '../shared/better-auth.Bi8FQwDD.mjs';
2
2
  export { APIError } from 'better-call';
3
- export { d as AuthEndpoint, e as AuthMiddleware, aE as callbackOAuth, a$ as changeEmail, aX as changePassword, b as createAuthEndpoint, c as createAuthMiddleware, aS as createEmailVerificationToken, aZ as deleteUser, a_ as deleteUserCallback, b0 as error, aP as forgetPassword, aQ as forgetPasswordCallback, aJ as freshSessionMiddleware, aA as getEndpoints, aF as getSession, aG as getSessionFromCtx, b4 as linkSocialAccount, aK as listSessions, b3 as listUserAccounts, b1 as ok, o as optionsMiddleware, b7 as originCheck, b6 as originCheckMiddleware, aI as requestOnlySessionMiddleware, aR as resetPassword, aN as revokeOtherSessions, aL as revokeSession, aM as revokeSessions, aB as router, aU as sendVerificationEmail, aT as sendVerificationEmailFn, aH as sessionMiddleware, aY as setPassword, aD as signInEmail, aC as signInSocial, aO as signOut, b2 as signUpEmail, b5 as unlinkAccount, aW as updateUser, aV as verifyEmail } from '../shared/better-auth.Gg7Z0WyK.mjs';
3
+ export { d as AuthEndpoint, e as AuthMiddleware, aE as callbackOAuth, a$ as changeEmail, aX as changePassword, b as createAuthEndpoint, c as createAuthMiddleware, aS as createEmailVerificationToken, aZ as deleteUser, a_ as deleteUserCallback, b0 as error, aP as forgetPassword, aQ as forgetPasswordCallback, aJ as freshSessionMiddleware, aA as getEndpoints, aF as getSession, aG as getSessionFromCtx, b4 as linkSocialAccount, aK as listSessions, b3 as listUserAccounts, b1 as ok, o as optionsMiddleware, b7 as originCheck, b6 as originCheckMiddleware, aI as requestOnlySessionMiddleware, aR as resetPassword, aN as revokeOtherSessions, aL as revokeSession, aM as revokeSessions, aB as router, aU as sendVerificationEmail, aT as sendVerificationEmailFn, aH as sessionMiddleware, aY as setPassword, aD as signInEmail, aC as signInSocial, aO as signOut, b2 as signUpEmail, b5 as unlinkAccount, aW as updateUser, aV as verifyEmail } from '../shared/better-auth.UmNSYtaE.mjs';
4
4
  import 'zod';
5
5
  import 'kysely';
6
6
  import '../shared/better-auth.C7bUpbPE.mjs';
@@ -1,6 +1,6 @@
1
1
  import '../shared/better-auth.Bi8FQwDD.js';
2
2
  export { APIError } from 'better-call';
3
- export { d as AuthEndpoint, e as AuthMiddleware, aE as callbackOAuth, a$ as changeEmail, aX as changePassword, b as createAuthEndpoint, c as createAuthMiddleware, aS as createEmailVerificationToken, aZ as deleteUser, a_ as deleteUserCallback, b0 as error, aP as forgetPassword, aQ as forgetPasswordCallback, aJ as freshSessionMiddleware, aA as getEndpoints, aF as getSession, aG as getSessionFromCtx, b4 as linkSocialAccount, aK as listSessions, b3 as listUserAccounts, b1 as ok, o as optionsMiddleware, b7 as originCheck, b6 as originCheckMiddleware, aI as requestOnlySessionMiddleware, aR as resetPassword, aN as revokeOtherSessions, aL as revokeSession, aM as revokeSessions, aB as router, aU as sendVerificationEmail, aT as sendVerificationEmailFn, aH as sessionMiddleware, aY as setPassword, aD as signInEmail, aC as signInSocial, aO as signOut, b2 as signUpEmail, b5 as unlinkAccount, aW as updateUser, aV as verifyEmail } from '../shared/better-auth.z5hCXEpq.js';
3
+ export { d as AuthEndpoint, e as AuthMiddleware, aE as callbackOAuth, a$ as changeEmail, aX as changePassword, b as createAuthEndpoint, c as createAuthMiddleware, aS as createEmailVerificationToken, aZ as deleteUser, a_ as deleteUserCallback, b0 as error, aP as forgetPassword, aQ as forgetPasswordCallback, aJ as freshSessionMiddleware, aA as getEndpoints, aF as getSession, aG as getSessionFromCtx, b4 as linkSocialAccount, aK as listSessions, b3 as listUserAccounts, b1 as ok, o as optionsMiddleware, b7 as originCheck, b6 as originCheckMiddleware, aI as requestOnlySessionMiddleware, aR as resetPassword, aN as revokeOtherSessions, aL as revokeSession, aM as revokeSessions, aB as router, aU as sendVerificationEmail, aT as sendVerificationEmailFn, aH as sessionMiddleware, aY as setPassword, aD as signInEmail, aC as signInSocial, aO as signOut, b2 as signUpEmail, b5 as unlinkAccount, aW as updateUser, aV as verifyEmail } from '../shared/better-auth.BUgzWHv2.js';
4
4
  import 'zod';
5
5
  import 'kysely';
6
6
  import '../shared/better-auth.2gyOPXIw.js';
@@ -1,5 +1,4 @@
1
- import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.Ce5ruaNV.cjs';
2
- export * from 'zod';
1
+ import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.EzTTQ-DT.cjs';
3
2
  import * as _better_fetch_fetch from '@better-fetch/fetch';
4
3
  import { BetterFetchError, BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
5
4
  export * from '@better-fetch/fetch';
@@ -7,7 +6,9 @@ import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferA
7
6
  export { AtomListener, InferAdditionalFromClient, InferPluginsFromClient, InferSessionFromClient, InferUserFromClient, Store } from '../types/index.cjs';
8
7
  import * as nanostores from 'nanostores';
9
8
  import { Atom, PreinitializedWritableAtom } from 'nanostores';
9
+ export * from 'nanostores';
10
10
  import { U as UnionToIntersection, P as PrettifyDeep } from '../shared/better-auth.Bi8FQwDD.cjs';
11
+ import 'zod';
11
12
  import 'kysely';
12
13
  import 'better-call';
13
14
  import '../shared/better-auth.B36e4YUo.cjs';
@@ -1,5 +1,4 @@
1
- import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.Gg7Z0WyK.mjs';
2
- export * from 'zod';
1
+ import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.UmNSYtaE.mjs';
3
2
  import * as _better_fetch_fetch from '@better-fetch/fetch';
4
3
  import { BetterFetchError, BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
5
4
  export * from '@better-fetch/fetch';
@@ -7,7 +6,9 @@ import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferA
7
6
  export { AtomListener, InferAdditionalFromClient, InferPluginsFromClient, InferSessionFromClient, InferUserFromClient, Store } from '../types/index.mjs';
8
7
  import * as nanostores from 'nanostores';
9
8
  import { Atom, PreinitializedWritableAtom } from 'nanostores';
9
+ export * from 'nanostores';
10
10
  import { U as UnionToIntersection, P as PrettifyDeep } from '../shared/better-auth.Bi8FQwDD.mjs';
11
+ import 'zod';
11
12
  import 'kysely';
12
13
  import 'better-call';
13
14
  import '../shared/better-auth.C7bUpbPE.mjs';
@@ -1,5 +1,4 @@
1
- import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.z5hCXEpq.js';
2
- export * from 'zod';
1
+ import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.BUgzWHv2.js';
3
2
  import * as _better_fetch_fetch from '@better-fetch/fetch';
4
3
  import { BetterFetchError, BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
5
4
  export * from '@better-fetch/fetch';
@@ -7,7 +6,9 @@ import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferA
7
6
  export { AtomListener, InferAdditionalFromClient, InferPluginsFromClient, InferSessionFromClient, InferUserFromClient, Store } from '../types/index.js';
8
7
  import * as nanostores from 'nanostores';
9
8
  import { Atom, PreinitializedWritableAtom } from 'nanostores';
9
+ export * from 'nanostores';
10
10
  import { U as UnionToIntersection, P as PrettifyDeep } from '../shared/better-auth.Bi8FQwDD.js';
11
+ import 'zod';
11
12
  import 'kysely';
12
13
  import 'better-call';
13
14
  import '../shared/better-auth.2gyOPXIw.js';
@@ -3,7 +3,7 @@ import { atom } from 'nanostores';
3
3
  import { AccessControl, Role, Statements } from '../../plugins/access/index.cjs';
4
4
  import * as _better_fetch_fetch from '@better-fetch/fetch';
5
5
  import { BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
6
- import { o as organization, I as InferMember, a as InferInvitation, T as Team, b as Organization, M as Member, c as Invitation } from '../../shared/better-auth.CDKE1pWJ.cjs';
6
+ import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation } from '../../plugins/organization/index.cjs';
7
7
  import { b as Prettify } from '../../shared/better-auth.Bi8FQwDD.cjs';
8
8
  import { username } from '../../plugins/username/index.cjs';
9
9
  import { Passkey, passkey } from '../../plugins/passkey/index.cjs';
@@ -11,7 +11,7 @@ export { twoFactorClient } from '../../plugins/two-factor/index.cjs';
11
11
  import { magicLink } from '../../plugins/magic-link/index.cjs';
12
12
  import { phoneNumber } from '../../plugins/phone-number/index.cjs';
13
13
  import { anonymous } from '../../plugins/anonymous/index.cjs';
14
- import { T as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.Ce5ruaNV.cjs';
14
+ import { T as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.EzTTQ-DT.cjs';
15
15
  import { admin } from '../../plugins/admin/index.cjs';
16
16
  import { genericOAuth } from '../../plugins/generic-oauth/index.cjs';
17
17
  import { jwt } from '../../plugins/jwt/index.cjs';
@@ -20,7 +20,7 @@ import { emailOTP } from '../../plugins/email-otp/index.cjs';
20
20
  import { Store } from '../../types/index.cjs';
21
21
  import { sso } from '../../plugins/sso/index.cjs';
22
22
  import { oidcProvider } from '../../plugins/oidc-provider/index.cjs';
23
- import { a as apiKey } from '../../shared/better-auth.mScwiXcw.cjs';
23
+ import { a as apiKey } from '../../shared/better-auth.Dxic9U80.cjs';
24
24
  export * from '@simplewebauthn/server';
25
25
  import 'zod';
26
26
  import 'better-call';
@@ -3,7 +3,7 @@ import { atom } from 'nanostores';
3
3
  import { AccessControl, Role, Statements } from '../../plugins/access/index.mjs';
4
4
  import * as _better_fetch_fetch from '@better-fetch/fetch';
5
5
  import { BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
6
- import { o as organization, I as InferMember, a as InferInvitation, T as Team, b as Organization, M as Member, c as Invitation } from '../../shared/better-auth.NTBHOnXV.mjs';
6
+ import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation } from '../../plugins/organization/index.mjs';
7
7
  import { b as Prettify } from '../../shared/better-auth.Bi8FQwDD.mjs';
8
8
  import { username } from '../../plugins/username/index.mjs';
9
9
  import { Passkey, passkey } from '../../plugins/passkey/index.mjs';
@@ -11,7 +11,7 @@ export { twoFactorClient } from '../../plugins/two-factor/index.mjs';
11
11
  import { magicLink } from '../../plugins/magic-link/index.mjs';
12
12
  import { phoneNumber } from '../../plugins/phone-number/index.mjs';
13
13
  import { anonymous } from '../../plugins/anonymous/index.mjs';
14
- import { T as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.Gg7Z0WyK.mjs';
14
+ import { T as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.UmNSYtaE.mjs';
15
15
  import { admin } from '../../plugins/admin/index.mjs';
16
16
  import { genericOAuth } from '../../plugins/generic-oauth/index.mjs';
17
17
  import { jwt } from '../../plugins/jwt/index.mjs';
@@ -20,7 +20,7 @@ import { emailOTP } from '../../plugins/email-otp/index.mjs';
20
20
  import { Store } from '../../types/index.mjs';
21
21
  import { sso } from '../../plugins/sso/index.mjs';
22
22
  import { oidcProvider } from '../../plugins/oidc-provider/index.mjs';
23
- import { a as apiKey } from '../../shared/better-auth.BChhyjyz.mjs';
23
+ import { a as apiKey } from '../../shared/better-auth.B63JbN8N.mjs';
24
24
  export * from '@simplewebauthn/server';
25
25
  import 'zod';
26
26
  import 'better-call';
@@ -3,7 +3,7 @@ import { atom } from 'nanostores';
3
3
  import { AccessControl, Role, Statements } from '../../plugins/access/index.js';
4
4
  import * as _better_fetch_fetch from '@better-fetch/fetch';
5
5
  import { BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
6
- import { o as organization, I as InferMember, a as InferInvitation, T as Team, b as Organization, M as Member, c as Invitation } from '../../shared/better-auth.CacwWJqS.js';
6
+ import { organization, InferMember, InferInvitation, Team, Organization, Member, Invitation } from '../../plugins/organization/index.js';
7
7
  import { b as Prettify } from '../../shared/better-auth.Bi8FQwDD.js';
8
8
  import { username } from '../../plugins/username/index.js';
9
9
  import { Passkey, passkey } from '../../plugins/passkey/index.js';
@@ -11,7 +11,7 @@ export { twoFactorClient } from '../../plugins/two-factor/index.js';
11
11
  import { magicLink } from '../../plugins/magic-link/index.js';
12
12
  import { phoneNumber } from '../../plugins/phone-number/index.js';
13
13
  import { anonymous } from '../../plugins/anonymous/index.js';
14
- import { T as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.z5hCXEpq.js';
14
+ import { T as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.BUgzWHv2.js';
15
15
  import { admin } from '../../plugins/admin/index.js';
16
16
  import { genericOAuth } from '../../plugins/generic-oauth/index.js';
17
17
  import { jwt } from '../../plugins/jwt/index.js';
@@ -20,7 +20,7 @@ import { emailOTP } from '../../plugins/email-otp/index.js';
20
20
  import { Store } from '../../types/index.js';
21
21
  import { sso } from '../../plugins/sso/index.js';
22
22
  import { oidcProvider } from '../../plugins/oidc-provider/index.js';
23
- import { a as apiKey } from '../../shared/better-auth.CgpkeCuV.js';
23
+ import { a as apiKey } from '../../shared/better-auth.zDOXHJ7C.js';
24
24
  export * from '@simplewebauthn/server';
25
25
  import 'zod';
26
26
  import 'better-call';
@@ -1,12 +1,13 @@
1
1
  import * as nanostores from 'nanostores';
2
2
  import { Store, StoreValue } from 'nanostores';
3
+ export * from 'nanostores';
3
4
  import * as _better_fetch_fetch from '@better-fetch/fetch';
4
5
  import { BetterFetchError } from '@better-fetch/fetch';
5
6
  export * from '@better-fetch/fetch';
6
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.cjs';
7
8
  import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.cjs';
8
9
  import { DependencyList } from 'react';
9
- import { h as BASE_ERROR_CODES } from '../../shared/better-auth.Ce5ruaNV.cjs';
10
+ import { h as BASE_ERROR_CODES } from '../../shared/better-auth.EzTTQ-DT.cjs';
10
11
  import 'better-call';
11
12
  import 'zod';
12
13
  import 'kysely';
@@ -1,12 +1,13 @@
1
1
  import * as nanostores from 'nanostores';
2
2
  import { Store, StoreValue } from 'nanostores';
3
+ export * from 'nanostores';
3
4
  import * as _better_fetch_fetch from '@better-fetch/fetch';
4
5
  import { BetterFetchError } from '@better-fetch/fetch';
5
6
  export * from '@better-fetch/fetch';
6
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.mjs';
7
8
  import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.mjs';
8
9
  import { DependencyList } from 'react';
9
- import { h as BASE_ERROR_CODES } from '../../shared/better-auth.Gg7Z0WyK.mjs';
10
+ import { h as BASE_ERROR_CODES } from '../../shared/better-auth.UmNSYtaE.mjs';
10
11
  import 'better-call';
11
12
  import 'zod';
12
13
  import 'kysely';
@@ -1,12 +1,13 @@
1
1
  import * as nanostores from 'nanostores';
2
2
  import { Store, StoreValue } from 'nanostores';
3
+ export * from 'nanostores';
3
4
  import * as _better_fetch_fetch from '@better-fetch/fetch';
4
5
  import { BetterFetchError } from '@better-fetch/fetch';
5
6
  export * from '@better-fetch/fetch';
6
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.js';
7
8
  import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.js';
8
9
  import { DependencyList } from 'react';
9
- import { h as BASE_ERROR_CODES } from '../../shared/better-auth.z5hCXEpq.js';
10
+ import { h as BASE_ERROR_CODES } from '../../shared/better-auth.BUgzWHv2.js';
10
11
  import 'better-call';
11
12
  import 'zod';
12
13
  import 'kysely';
@@ -4,8 +4,8 @@ export * from '@better-fetch/fetch';
4
4
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.cjs';
5
5
  import { Accessor } from 'solid-js';
6
6
  import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.cjs';
7
- import { h as BASE_ERROR_CODES } from '../../shared/better-auth.Ce5ruaNV.cjs';
8
- import 'nanostores';
7
+ import { h as BASE_ERROR_CODES } from '../../shared/better-auth.EzTTQ-DT.cjs';
8
+ export * from 'nanostores';
9
9
  import 'better-call';
10
10
  import 'zod';
11
11
  import 'kysely';
@@ -4,8 +4,8 @@ export * from '@better-fetch/fetch';
4
4
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.mjs';
5
5
  import { Accessor } from 'solid-js';
6
6
  import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.mjs';
7
- import { h as BASE_ERROR_CODES } from '../../shared/better-auth.Gg7Z0WyK.mjs';
8
- import 'nanostores';
7
+ import { h as BASE_ERROR_CODES } from '../../shared/better-auth.UmNSYtaE.mjs';
8
+ export * from 'nanostores';
9
9
  import 'better-call';
10
10
  import 'zod';
11
11
  import 'kysely';
@@ -4,8 +4,8 @@ export * from '@better-fetch/fetch';
4
4
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.js';
5
5
  import { Accessor } from 'solid-js';
6
6
  import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.js';
7
- import { h as BASE_ERROR_CODES } from '../../shared/better-auth.z5hCXEpq.js';
8
- import 'nanostores';
7
+ import { h as BASE_ERROR_CODES } from '../../shared/better-auth.BUgzWHv2.js';
8
+ export * from 'nanostores';
9
9
  import 'better-call';
10
10
  import 'zod';
11
11
  import 'kysely';
@@ -1,11 +1,12 @@
1
1
  import * as nanostores from 'nanostores';
2
2
  import { Atom } from 'nanostores';
3
+ export * from 'nanostores';
3
4
  import * as _better_fetch_fetch from '@better-fetch/fetch';
4
5
  import { BetterFetchError } from '@better-fetch/fetch';
5
6
  export * from '@better-fetch/fetch';
6
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.cjs';
7
8
  import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.cjs';
8
- import { h as BASE_ERROR_CODES } from '../../shared/better-auth.Ce5ruaNV.cjs';
9
+ import { h as BASE_ERROR_CODES } from '../../shared/better-auth.EzTTQ-DT.cjs';
9
10
  import 'better-call';
10
11
  import 'zod';
11
12
  import 'kysely';
@@ -1,11 +1,12 @@
1
1
  import * as nanostores from 'nanostores';
2
2
  import { Atom } from 'nanostores';
3
+ export * from 'nanostores';
3
4
  import * as _better_fetch_fetch from '@better-fetch/fetch';
4
5
  import { BetterFetchError } from '@better-fetch/fetch';
5
6
  export * from '@better-fetch/fetch';
6
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.mjs';
7
8
  import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.mjs';
8
- import { h as BASE_ERROR_CODES } from '../../shared/better-auth.Gg7Z0WyK.mjs';
9
+ import { h as BASE_ERROR_CODES } from '../../shared/better-auth.UmNSYtaE.mjs';
9
10
  import 'better-call';
10
11
  import 'zod';
11
12
  import 'kysely';
@@ -1,11 +1,12 @@
1
1
  import * as nanostores from 'nanostores';
2
2
  import { Atom } from 'nanostores';
3
+ export * from 'nanostores';
3
4
  import * as _better_fetch_fetch from '@better-fetch/fetch';
4
5
  import { BetterFetchError } from '@better-fetch/fetch';
5
6
  export * from '@better-fetch/fetch';
6
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.js';
7
8
  import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.js';
8
- import { h as BASE_ERROR_CODES } from '../../shared/better-auth.z5hCXEpq.js';
9
+ import { h as BASE_ERROR_CODES } from '../../shared/better-auth.BUgzWHv2.js';
9
10
  import 'better-call';
10
11
  import 'zod';
11
12
  import 'kysely';
@@ -1,11 +1,12 @@
1
1
  import * as nanostores from 'nanostores';
2
+ export * from 'nanostores';
2
3
  import * as _better_fetch_fetch from '@better-fetch/fetch';
3
4
  import { BetterFetchError } from '@better-fetch/fetch';
4
5
  export * from '@better-fetch/fetch';
5
6
  import { DeepReadonly, Ref } from 'vue';
6
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.cjs';
7
8
  import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.cjs';
8
- import { h as BASE_ERROR_CODES } from '../../shared/better-auth.Ce5ruaNV.cjs';
9
+ import { h as BASE_ERROR_CODES } from '../../shared/better-auth.EzTTQ-DT.cjs';
9
10
  import 'better-call';
10
11
  import 'zod';
11
12
  import 'kysely';
@@ -1,11 +1,12 @@
1
1
  import * as nanostores from 'nanostores';
2
+ export * from 'nanostores';
2
3
  import * as _better_fetch_fetch from '@better-fetch/fetch';
3
4
  import { BetterFetchError } from '@better-fetch/fetch';
4
5
  export * from '@better-fetch/fetch';
5
6
  import { DeepReadonly, Ref } from 'vue';
6
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.mjs';
7
8
  import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.mjs';
8
- import { h as BASE_ERROR_CODES } from '../../shared/better-auth.Gg7Z0WyK.mjs';
9
+ import { h as BASE_ERROR_CODES } from '../../shared/better-auth.UmNSYtaE.mjs';
9
10
  import 'better-call';
10
11
  import 'zod';
11
12
  import 'kysely';
@@ -1,11 +1,12 @@
1
1
  import * as nanostores from 'nanostores';
2
+ export * from 'nanostores';
2
3
  import * as _better_fetch_fetch from '@better-fetch/fetch';
3
4
  import { BetterFetchError } from '@better-fetch/fetch';
4
5
  export * from '@better-fetch/fetch';
5
6
  import { DeepReadonly, Ref } from 'vue';
6
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.js';
7
8
  import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.js';
8
- import { h as BASE_ERROR_CODES } from '../../shared/better-auth.z5hCXEpq.js';
9
+ import { h as BASE_ERROR_CODES } from '../../shared/better-auth.BUgzWHv2.js';
9
10
  import 'better-call';
10
11
  import 'zod';
11
12
  import 'kysely';
@@ -6,6 +6,7 @@ const env = require('../shared/better-auth.DiSjtgs9.cjs');
6
6
  const base64 = require('@better-auth/utils/base64');
7
7
  const hmac = require('@better-auth/utils/hmac');
8
8
  const json = require('../shared/better-auth.D3mtHEZg.cjs');
9
+ const url = require('../shared/better-auth.C-R0J0n1.cjs');
9
10
 
10
11
  const createTime = (value, format) => {
11
12
  const toMilliseconds = () => {
@@ -350,17 +351,26 @@ function parseCookies(cookieHeader) {
350
351
  return cookieMap;
351
352
  }
352
353
  const getSessionCookie = (request, config) => {
354
+ if (config?.cookiePrefix) {
355
+ if (config.cookieName) {
356
+ config.cookiePrefix = `${config.cookiePrefix}-`;
357
+ } else {
358
+ config.cookiePrefix = `${config.cookiePrefix}.`;
359
+ }
360
+ }
353
361
  const headers = request instanceof Headers ? request : request.headers;
362
+ const req = request instanceof Request ? request : void 0;
363
+ const url$1 = url.getBaseURL(req?.url, config?.path, req);
354
364
  const cookies = headers.get("cookie");
355
365
  if (!cookies) {
356
366
  return null;
357
367
  }
358
368
  const {
359
369
  cookieName = "session_token",
360
- cookiePrefix = "better-auth",
361
- useSecureCookies = request instanceof Request && env.isProduction && request.url.startsWith("https://") || (request instanceof Request && request.url.startsWith("https://") ? true : false)
370
+ cookiePrefix = "better-auth.",
371
+ useSecureCookies = env.isProduction || url$1?.startsWith("https://") ? true : false
362
372
  } = config || {};
363
- const name = useSecureCookies ? `__Secure-${cookiePrefix}.${cookieName}` : `${cookiePrefix}.${cookieName}`;
373
+ const name = useSecureCookies ? `__Secure-${cookiePrefix}${cookieName}` : `${cookiePrefix}${cookieName}`;
364
374
  const parsedCookie = parseCookies(cookies);
365
375
  const sessionToken = parsedCookie.get(name);
366
376
  if (sessionToken) {
@@ -1,5 +1,5 @@
1
1
  import 'better-call';
2
- export { aq as BetterAuthCookies, av as EligibleCookies, ao as createCookieGetter, at as deleteSessionCookie, ax as getCookieCache, ap as getCookies, aw as getSessionCookie, au as parseCookies, ay as parseSetCookieHeader, ar as setCookieCache, az as setCookieToHeader, as as setSessionCookie } from '../shared/better-auth.Ce5ruaNV.cjs';
2
+ export { aq as BetterAuthCookies, av as EligibleCookies, ao as createCookieGetter, at as deleteSessionCookie, ax as getCookieCache, ap as getCookies, aw as getSessionCookie, au as parseCookies, ay as parseSetCookieHeader, ar as setCookieCache, az as setCookieToHeader, as as setSessionCookie } from '../shared/better-auth.EzTTQ-DT.cjs';
3
3
  import '../shared/better-auth.Bi8FQwDD.cjs';
4
4
  import 'zod';
5
5
  import 'kysely';
@@ -1,5 +1,5 @@
1
1
  import 'better-call';
2
- export { aq as BetterAuthCookies, av as EligibleCookies, ao as createCookieGetter, at as deleteSessionCookie, ax as getCookieCache, ap as getCookies, aw as getSessionCookie, au as parseCookies, ay as parseSetCookieHeader, ar as setCookieCache, az as setCookieToHeader, as as setSessionCookie } from '../shared/better-auth.Gg7Z0WyK.mjs';
2
+ export { aq as BetterAuthCookies, av as EligibleCookies, ao as createCookieGetter, at as deleteSessionCookie, ax as getCookieCache, ap as getCookies, aw as getSessionCookie, au as parseCookies, ay as parseSetCookieHeader, ar as setCookieCache, az as setCookieToHeader, as as setSessionCookie } from '../shared/better-auth.UmNSYtaE.mjs';
3
3
  import '../shared/better-auth.Bi8FQwDD.mjs';
4
4
  import 'zod';
5
5
  import 'kysely';
@@ -1,5 +1,5 @@
1
1
  import 'better-call';
2
- export { aq as BetterAuthCookies, av as EligibleCookies, ao as createCookieGetter, at as deleteSessionCookie, ax as getCookieCache, ap as getCookies, aw as getSessionCookie, au as parseCookies, ay as parseSetCookieHeader, ar as setCookieCache, az as setCookieToHeader, as as setSessionCookie } from '../shared/better-auth.z5hCXEpq.js';
2
+ export { aq as BetterAuthCookies, av as EligibleCookies, ao as createCookieGetter, at as deleteSessionCookie, ax as getCookieCache, ap as getCookies, aw as getSessionCookie, au as parseCookies, ay as parseSetCookieHeader, ar as setCookieCache, az as setCookieToHeader, as as setSessionCookie } from '../shared/better-auth.BUgzWHv2.js';
3
3
  import '../shared/better-auth.Bi8FQwDD.js';
4
4
  import 'zod';
5
5
  import 'kysely';
@@ -4,6 +4,7 @@ import { a as isProduction } from '../shared/better-auth.8zoxzg-F.mjs';
4
4
  import { base64Url } from '@better-auth/utils/base64';
5
5
  import { createHMAC } from '@better-auth/utils/hmac';
6
6
  import { s as safeJSONParse } from '../shared/better-auth.tB5eU6EY.mjs';
7
+ import { a as getBaseURL } from '../shared/better-auth.VTXNLFMT.mjs';
7
8
 
8
9
  const createTime = (value, format) => {
9
10
  const toMilliseconds = () => {
@@ -348,17 +349,26 @@ function parseCookies(cookieHeader) {
348
349
  return cookieMap;
349
350
  }
350
351
  const getSessionCookie = (request, config) => {
352
+ if (config?.cookiePrefix) {
353
+ if (config.cookieName) {
354
+ config.cookiePrefix = `${config.cookiePrefix}-`;
355
+ } else {
356
+ config.cookiePrefix = `${config.cookiePrefix}.`;
357
+ }
358
+ }
351
359
  const headers = request instanceof Headers ? request : request.headers;
360
+ const req = request instanceof Request ? request : void 0;
361
+ const url = getBaseURL(req?.url, config?.path, req);
352
362
  const cookies = headers.get("cookie");
353
363
  if (!cookies) {
354
364
  return null;
355
365
  }
356
366
  const {
357
367
  cookieName = "session_token",
358
- cookiePrefix = "better-auth",
359
- useSecureCookies = request instanceof Request && isProduction && request.url.startsWith("https://") || (request instanceof Request && request.url.startsWith("https://") ? true : false)
368
+ cookiePrefix = "better-auth.",
369
+ useSecureCookies = isProduction || url?.startsWith("https://") ? true : false
360
370
  } = config || {};
361
- const name = useSecureCookies ? `__Secure-${cookiePrefix}.${cookieName}` : `${cookiePrefix}.${cookieName}`;
371
+ const name = useSecureCookies ? `__Secure-${cookiePrefix}${cookieName}` : `${cookiePrefix}${cookieName}`;
362
372
  const parsedCookie = parseCookies(cookies);
363
373
  const sessionToken = parsedCookie.get(name);
364
374
  if (sessionToken) {
@@ -1,5 +1,5 @@
1
- import { g as Adapter, f as BetterAuthOptions, G as GenericEndpointContext, W as Where, T as FieldAttribute, X as FieldType, K as KyselyDatabaseType } from '../shared/better-auth.Ce5ruaNV.cjs';
2
- export { a7 as BetterAuthDbSchema, _ as FieldAttributeConfig, a6 as InferFieldsFromOptions, a5 as InferFieldsFromPlugins, a2 as InferFieldsInput, a3 as InferFieldsInputClient, a1 as InferFieldsOutput, a0 as InferValueType, Z as InternalAdapter, a4 as PluginFieldAttribute, a9 as accountSchema, $ as createFieldAttribute, Y as createInternalAdapter, ae as getAllFields, a8 as getAuthTables, an as mergeSchema, al as parseAccountInput, ag as parseAccountOutput, ak as parseAdditionalUserInput, ai as parseInputData, ad as parseOutputData, am as parseSessionInput, ah as parseSessionOutput, aj as parseUserInput, af as parseUserOutput, ab as sessionSchema, aa as userSchema, ac as verificationSchema } from '../shared/better-auth.Ce5ruaNV.cjs';
1
+ import { g as Adapter, f as BetterAuthOptions, G as GenericEndpointContext, W as Where, T as FieldAttribute, X as FieldType, K as KyselyDatabaseType } from '../shared/better-auth.EzTTQ-DT.cjs';
2
+ export { a7 as BetterAuthDbSchema, _ as FieldAttributeConfig, a6 as InferFieldsFromOptions, a5 as InferFieldsFromPlugins, a2 as InferFieldsInput, a3 as InferFieldsInputClient, a1 as InferFieldsOutput, a0 as InferValueType, Z as InternalAdapter, a4 as PluginFieldAttribute, a9 as accountSchema, $ as createFieldAttribute, Y as createInternalAdapter, ae as getAllFields, a8 as getAuthTables, an as mergeSchema, al as parseAccountInput, ag as parseAccountOutput, ak as parseAdditionalUserInput, ai as parseInputData, ad as parseOutputData, am as parseSessionInput, ah as parseSessionOutput, aj as parseUserInput, af as parseUserOutput, ab as sessionSchema, aa as userSchema, ac as verificationSchema } from '../shared/better-auth.EzTTQ-DT.cjs';
3
3
  import { z } from 'zod';
4
4
  import '../shared/better-auth.Bi8FQwDD.cjs';
5
5
  import 'kysely';