better-auth 1.4.6-beta.6 → 1.4.6

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 (124) hide show
  1. package/dist/{admin-B7ejdSlw.mjs → admin-D3dkvy2B.mjs} +3 -3
  2. package/dist/{anonymous-DtDX1Tt1.mjs → anonymous-DdvvZkp2.mjs} +3 -3
  3. package/dist/api/index.d.mts +1 -1
  4. package/dist/api/index.mjs +3 -3
  5. package/dist/{api-Btgd2bgm.mjs → api-D0cF0fk5.mjs} +9 -6
  6. package/dist/auth/minimal.d.mts +1 -1
  7. package/dist/auth/minimal.mjs +4 -4
  8. package/dist/{auth-CyEpSXRo.mjs → auth-B0dDDQwu.mjs} +1 -1
  9. package/dist/{base-DXLar-6_.mjs → base-vYFdAXPf.mjs} +2 -2
  10. package/dist/{bearer-C79h5z5t.mjs → bearer-BokOr6kW.mjs} +1 -1
  11. package/dist/client/index.d.mts +20 -20
  12. package/dist/client/lynx/index.d.mts +16 -16
  13. package/dist/client/plugins/index.d.mts +45 -35
  14. package/dist/client/plugins/index.mjs +1 -1
  15. package/dist/client/react/index.d.mts +16 -16
  16. package/dist/client/solid/index.d.mts +14 -14
  17. package/dist/client/svelte/index.d.mts +16 -16
  18. package/dist/client/vue/index.d.mts +16 -16
  19. package/dist/cookies/index.d.mts +2 -2
  20. package/dist/cookies/index.mjs +1 -1
  21. package/dist/{cookies-C9MZZaJ2.mjs → cookies-CT1-kARg.mjs} +16 -0
  22. package/dist/{custom-session-CjpmKFme.mjs → custom-session-BOf6qJyT.mjs} +1 -1
  23. package/dist/db/index.d.mts +1 -1
  24. package/dist/{device-authorization-B51s2iTw.mjs → device-authorization-ChLp9Fps.mjs} +1 -1
  25. package/dist/{email-otp-DO0Vrg6W.mjs → email-otp-LCFGutjQ.mjs} +3 -3
  26. package/dist/{generic-oauth-BNvAoIN9.mjs → generic-oauth-DNGQf7pj.mjs} +3 -3
  27. package/dist/{haveibeenpwned-DEA7QGzT.mjs → haveibeenpwned-Be4wVme3.mjs} +1 -1
  28. package/dist/{index-CfASVIzV.d.mts → index-B01OM6Wg.d.mts} +10 -10
  29. package/dist/{index-B9_77v0f.d.mts → index-BInUfw2R.d.mts} +13 -13
  30. package/dist/{index-C6JlLkZw.d.mts → index-BZSqJoCN.d.mts} +147 -147
  31. package/dist/{index-Dvwu5Hj9.d.mts → index-Bc5A5Xje.d.mts} +6 -6
  32. package/dist/{index-Dn7rFwsf.d.mts → index-Bd216dFj.d.mts} +3 -3
  33. package/dist/{index-CU9sNB4D.d.mts → index-BpQUAVLc.d.mts} +34 -34
  34. package/dist/{index-NphISEhZ.d.mts → index-C3Osl3iH.d.mts} +4 -4
  35. package/dist/{index-Dv8SEq_Z.d.mts → index-CRKlsq0c.d.mts} +6 -6
  36. package/dist/{index-DAWHK5U0.d.mts → index-CTqO-57U.d.mts} +5 -5
  37. package/dist/{index-BwB7s4Pk.d.mts → index-CircvHXF.d.mts} +8 -18
  38. package/dist/{index-C_t-hZXK.d.mts → index-CkZRXsqi.d.mts} +29 -29
  39. package/dist/{index-B3CSW56D.d.mts → index-Cm6yBUc4.d.mts} +24 -15
  40. package/dist/{index-C4YXDQqI.d.mts → index-CmCL4oIp.d.mts} +3 -3
  41. package/dist/{index-tiYKFe5k.d.mts → index-CpKH-xWB.d.mts} +3 -3
  42. package/dist/{index-Cg12btK0.d.mts → index-D4n3RgcF.d.mts} +2 -2
  43. package/dist/{index-CliPP00E.d.mts → index-D50id6l_.d.mts} +1 -1
  44. package/dist/{index-B6HepD87.d.mts → index-D6frN7IY.d.mts} +31 -31
  45. package/dist/{index-CTZv2mQK.d.mts → index-DF8xqi-5.d.mts} +14 -14
  46. package/dist/{index-DZ8eC6CZ.d.mts → index-DOcLs18d.d.mts} +3 -3
  47. package/dist/{index-7_n2Onxy.d.mts → index-K6Y-wVlZ.d.mts} +131 -131
  48. package/dist/{index-DozBmQMU.d.mts → index-iRK1LqiD.d.mts} +6 -6
  49. package/dist/index.d.mts +1 -1
  50. package/dist/index.mjs +5 -5
  51. package/dist/integrations/next-js.d.mts +4 -4
  52. package/dist/integrations/next-js.mjs +1 -1
  53. package/dist/integrations/node.d.mts +1 -1
  54. package/dist/integrations/svelte-kit.d.mts +3 -3
  55. package/dist/integrations/svelte-kit.mjs +1 -1
  56. package/dist/integrations/tanstack-start.d.mts +2 -2
  57. package/dist/integrations/tanstack-start.mjs +1 -1
  58. package/dist/{jwt-gFa83_p0.mjs → jwt-o3U8nmVY.mjs} +2 -2
  59. package/dist/{magic-link-zRf-3e5H.mjs → magic-link-BHNPUuy4.mjs} +12 -9
  60. package/dist/{multi-session-Bvamjr7i.mjs → multi-session-C1lYHMcQ.mjs} +3 -3
  61. package/dist/{oauth-proxy-Blgslqyg.mjs → oauth-proxy-Czg2s3uK.mjs} +10 -37
  62. package/dist/oauth2/index.d.mts +1 -1
  63. package/dist/oauth2/index.mjs +3 -3
  64. package/dist/{oidc-provider--yoKG1Rw.mjs → oidc-provider-CDvxiCPp.mjs} +4 -4
  65. package/dist/{one-tap-1XvovR3W.mjs → one-tap-DoWUMtQ5.mjs} +2 -2
  66. package/dist/{one-time-token-CrBN7B6D.mjs → one-time-token-DnKJcDhF.mjs} +1 -1
  67. package/dist/{open-api-BPImNq0U.mjs → open-api-CDXFoNkR.mjs} +1 -1
  68. package/dist/{organization-BnyWu4xx.mjs → organization-BTyHxn_-.mjs} +3 -3
  69. package/dist/{phone-number-Blz1Bfdf.mjs → phone-number-VZ7X_qf0.mjs} +2 -2
  70. package/dist/plugins/admin/access/index.d.mts +20 -20
  71. package/dist/plugins/admin/index.d.mts +20 -20
  72. package/dist/plugins/admin/index.mjs +4 -4
  73. package/dist/plugins/anonymous/index.d.mts +2 -2
  74. package/dist/plugins/anonymous/index.mjs +4 -4
  75. package/dist/plugins/bearer/index.d.mts +1 -1
  76. package/dist/plugins/bearer/index.mjs +2 -2
  77. package/dist/plugins/custom-session/index.d.mts +2 -2
  78. package/dist/plugins/custom-session/index.mjs +4 -4
  79. package/dist/plugins/device-authorization/index.d.mts +1 -1
  80. package/dist/plugins/device-authorization/index.mjs +3 -3
  81. package/dist/plugins/email-otp/index.d.mts +1 -1
  82. package/dist/plugins/email-otp/index.mjs +4 -4
  83. package/dist/plugins/generic-oauth/index.d.mts +1 -1
  84. package/dist/plugins/generic-oauth/index.mjs +4 -4
  85. package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
  86. package/dist/plugins/haveibeenpwned/index.mjs +4 -4
  87. package/dist/plugins/index.d.mts +20 -20
  88. package/dist/plugins/index.mjs +25 -25
  89. package/dist/plugins/jwt/index.d.mts +2 -2
  90. package/dist/plugins/jwt/index.mjs +4 -4
  91. package/dist/plugins/magic-link/index.d.mts +1 -1
  92. package/dist/plugins/magic-link/index.mjs +4 -4
  93. package/dist/plugins/multi-session/index.d.mts +3 -1
  94. package/dist/plugins/multi-session/index.mjs +4 -4
  95. package/dist/plugins/oauth-proxy/index.d.mts +1 -1
  96. package/dist/plugins/oauth-proxy/index.mjs +4 -4
  97. package/dist/plugins/oidc-provider/index.d.mts +20 -20
  98. package/dist/plugins/oidc-provider/index.mjs +5 -5
  99. package/dist/plugins/one-tap/index.d.mts +1 -1
  100. package/dist/plugins/one-tap/index.mjs +4 -4
  101. package/dist/plugins/one-time-token/index.d.mts +2 -2
  102. package/dist/plugins/one-time-token/index.mjs +4 -4
  103. package/dist/plugins/open-api/index.d.mts +1 -1
  104. package/dist/plugins/open-api/index.mjs +4 -4
  105. package/dist/plugins/organization/access/index.d.mts +20 -20
  106. package/dist/plugins/organization/index.d.mts +20 -20
  107. package/dist/plugins/organization/index.mjs +4 -4
  108. package/dist/plugins/phone-number/index.d.mts +2 -2
  109. package/dist/plugins/phone-number/index.mjs +4 -4
  110. package/dist/plugins/siwe/index.d.mts +2 -2
  111. package/dist/plugins/siwe/index.mjs +4 -4
  112. package/dist/plugins/two-factor/index.d.mts +2 -2
  113. package/dist/plugins/two-factor/index.mjs +4 -4
  114. package/dist/plugins/username/index.d.mts +1 -1
  115. package/dist/plugins/username/index.mjs +4 -4
  116. package/dist/{plugins-Kx4OCNqR.mjs → plugins-BU90BfUc.mjs} +4 -4
  117. package/dist/{session-DzeN0NAi.mjs → session-BYq-s4dF.mjs} +1 -1
  118. package/dist/{siwe-B0GnyaM0.mjs → siwe-BNO0Sihp.mjs} +2 -2
  119. package/dist/test-utils/index.d.mts +14 -14
  120. package/dist/test-utils/index.mjs +27 -27
  121. package/dist/{two-factor-CMqf0Z5n.mjs → two-factor-DsiBWAeX.mjs} +2 -2
  122. package/dist/types/index.d.mts +1 -1
  123. package/dist/{username-CXCisLFK.mjs → username-DcCXmY8e.mjs} +2 -2
  124. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  import { l as parseUserOutput, t as mergeSchema, u as getDate } from "./schema-dfOF7vRb.mjs";
2
- import { t as APIError } from "./api-Btgd2bgm.mjs";
3
- import { c as setSessionCookie, n as deleteSessionCookie } from "./cookies-C9MZZaJ2.mjs";
4
- import { r as getSessionFromCtx } from "./session-DzeN0NAi.mjs";
2
+ import { t as APIError } from "./api-D0cF0fk5.mjs";
3
+ import { c as setSessionCookie, n as deleteSessionCookie } from "./cookies-CT1-kARg.mjs";
4
+ import { r as getSessionFromCtx } from "./session-BYq-s4dF.mjs";
5
5
  import { r as defaultRoles } from "./access-DZRRE6Tq.mjs";
6
6
  import { t as hasPermission } from "./has-permission-BxveqtYZ.mjs";
7
7
  import { t as getEndpointResponse } from "./plugin-helper-BneBaGtD.mjs";
@@ -1,7 +1,7 @@
1
1
  import { t as mergeSchema } from "./schema-dfOF7vRb.mjs";
2
- import { t as APIError } from "./api-Btgd2bgm.mjs";
3
- import { c as setSessionCookie, l as parseSetCookieHeader } from "./cookies-C9MZZaJ2.mjs";
4
- import { r as getSessionFromCtx } from "./session-DzeN0NAi.mjs";
2
+ import { t as APIError } from "./api-D0cF0fk5.mjs";
3
+ import { c as setSessionCookie, l as parseSetCookieHeader } from "./cookies-CT1-kARg.mjs";
4
+ import { r as getSessionFromCtx } from "./session-BYq-s4dF.mjs";
5
5
  import { defineErrorCodes, generateId } from "@better-auth/core/utils";
6
6
  import * as z from "zod";
7
7
  import { createAuthEndpoint, createAuthMiddleware } from "@better-auth/core/api";
@@ -1,3 +1,3 @@
1
- import { A as requestPasswordReset, B as accountInfo, C as listSessions, D as revokeSessions, E as revokeSession, F as createEmailVerificationToken, G as unlinkAccount, H as linkSocialAccount, I as sendVerificationEmail, J as getOAuthState, K as originCheck, L as sendVerificationEmailFn, M as resetPassword, N as ok, O as sensitiveSessionMiddleware, P as error, R as verifyEmail, S as getSessionFromCtx, T as revokeOtherSessions, U as listUserAccounts, V as getAccessToken, W as refreshToken, Y as getIp, _ as signOut, a as createAuthEndpoint, b as freshSessionMiddleware, c as optionsMiddleware, d as changePassword, f as deleteUser, g as signUpEmail, h as updateUser, i as checkEndpointConflicts, j as requestPasswordResetCallback, k as sessionMiddleware, l as router, m as setPassword, n as AuthEndpoint, o as createAuthMiddleware, p as deleteUserCallback, q as originCheckMiddleware, r as AuthMiddleware, s as getEndpoints, t as APIError, u as changeEmail, v as signInEmail, w as requestOnlySessionMiddleware, x as getSession, y as signInSocial, z as callbackOAuth } from "../index-C6JlLkZw.mjs";
1
+ import { A as requestPasswordReset, B as accountInfo, C as listSessions, D as revokeSessions, E as revokeSession, F as createEmailVerificationToken, G as unlinkAccount, H as linkSocialAccount, I as sendVerificationEmail, J as getOAuthState, K as originCheck, L as sendVerificationEmailFn, M as resetPassword, N as ok, O as sensitiveSessionMiddleware, P as error, R as verifyEmail, S as getSessionFromCtx, T as revokeOtherSessions, U as listUserAccounts, V as getAccessToken, W as refreshToken, Y as getIp, _ as signOut, a as createAuthEndpoint, b as freshSessionMiddleware, c as optionsMiddleware, d as changePassword, f as deleteUser, g as signUpEmail, h as updateUser, i as checkEndpointConflicts, j as requestPasswordResetCallback, k as sessionMiddleware, l as router, m as setPassword, n as AuthEndpoint, o as createAuthMiddleware, p as deleteUserCallback, q as originCheckMiddleware, r as AuthMiddleware, s as getEndpoints, t as APIError, u as changeEmail, v as signInEmail, w as requestOnlySessionMiddleware, x as getSession, y as signInSocial, z as callbackOAuth } from "../index-BZSqJoCN.mjs";
2
2
  import "../plugins-DLdyc73z.mjs";
3
3
  export { APIError, AuthEndpoint, AuthMiddleware, accountInfo, callbackOAuth, changeEmail, changePassword, checkEndpointConflicts, createAuthEndpoint, createAuthMiddleware, createEmailVerificationToken, deleteUser, deleteUserCallback, error, freshSessionMiddleware, getAccessToken, getEndpoints, getIp, getOAuthState, getSession, getSessionFromCtx, linkSocialAccount, listSessions, listUserAccounts, ok, optionsMiddleware, originCheck, originCheckMiddleware, refreshToken, requestOnlySessionMiddleware, requestPasswordReset, requestPasswordResetCallback, resetPassword, revokeOtherSessions, revokeSession, revokeSessions, router, sendVerificationEmail, sendVerificationEmailFn, sensitiveSessionMiddleware, sessionMiddleware, setPassword, signInEmail, signInSocial, signOut, signUpEmail, unlinkAccount, updateUser, verifyEmail };
@@ -3,10 +3,10 @@ import "../get-migration-CDvYpogu.mjs";
3
3
  import "../schema-dfOF7vRb.mjs";
4
4
  import { t as getIp } from "../get-request-ip-G2Tcmzbb.mjs";
5
5
  import { a as getOAuthState } from "../utils-C4Ub_EYH.mjs";
6
- import { A as getAccessToken, C as createEmailVerificationToken, D as callbackOAuth, E as verifyEmail, M as listUserAccounts, N as refreshToken, P as unlinkAccount, R as originCheck, S as error, T as sendVerificationEmailFn, _ as signInSocial, a as getEndpoints, b as resetPassword, c as changeEmail, d as deleteUserCallback, f as setPassword, g as signInEmail, h as signOut, i as createAuthMiddleware, j as linkSocialAccount, k as accountInfo, l as changePassword, m as signUpEmail, n as checkEndpointConflicts, o as optionsMiddleware, p as updateUser, r as createAuthEndpoint, s as router, t as APIError, u as deleteUser, v as requestPasswordReset, w as sendVerificationEmail, x as ok, y as requestPasswordResetCallback, z as originCheckMiddleware } from "../api-Btgd2bgm.mjs";
6
+ import { A as getAccessToken, C as createEmailVerificationToken, D as callbackOAuth, E as verifyEmail, M as listUserAccounts, N as refreshToken, P as unlinkAccount, R as originCheck, S as error, T as sendVerificationEmailFn, _ as signInSocial, a as getEndpoints, b as resetPassword, c as changeEmail, d as deleteUserCallback, f as setPassword, g as signInEmail, h as signOut, i as createAuthMiddleware, j as linkSocialAccount, k as accountInfo, l as changePassword, m as signUpEmail, n as checkEndpointConflicts, o as optionsMiddleware, p as updateUser, r as createAuthEndpoint, s as router, t as APIError, u as deleteUser, v as requestPasswordReset, w as sendVerificationEmail, x as ok, y as requestPasswordResetCallback, z as originCheckMiddleware } from "../api-D0cF0fk5.mjs";
7
7
  import "../crypto-DgVHxgLL.mjs";
8
- import "../cookies-C9MZZaJ2.mjs";
8
+ import "../cookies-CT1-kARg.mjs";
9
9
  import "../url-B7VXiggp.mjs";
10
- import { a as requestOnlySessionMiddleware, c as revokeSessions, i as listSessions, l as sensitiveSessionMiddleware, n as getSession, o as revokeOtherSessions, r as getSessionFromCtx, s as revokeSession, t as freshSessionMiddleware, u as sessionMiddleware } from "../session-DzeN0NAi.mjs";
10
+ import { a as requestOnlySessionMiddleware, c as revokeSessions, i as listSessions, l as sensitiveSessionMiddleware, n as getSession, o as revokeOtherSessions, r as getSessionFromCtx, s as revokeSession, t as freshSessionMiddleware, u as sessionMiddleware } from "../session-BYq-s4dF.mjs";
11
11
 
12
12
  export { APIError, accountInfo, callbackOAuth, changeEmail, changePassword, checkEndpointConflicts, createAuthEndpoint, createAuthMiddleware, createEmailVerificationToken, deleteUser, deleteUserCallback, error, freshSessionMiddleware, getAccessToken, getEndpoints, getIp, getOAuthState, getSession, getSessionFromCtx, linkSocialAccount, listSessions, listUserAccounts, ok, optionsMiddleware, originCheck, originCheckMiddleware, refreshToken, requestOnlySessionMiddleware, requestPasswordReset, requestPasswordResetCallback, resetPassword, revokeOtherSessions, revokeSession, revokeSessions, router, sendVerificationEmail, sendVerificationEmailFn, sensitiveSessionMiddleware, sessionMiddleware, setPassword, signInEmail, signInSocial, signOut, signUpEmail, unlinkAccount, updateUser, verifyEmail };
@@ -2,8 +2,8 @@ import { c as parseUserInput, l as parseUserOutput, u as getDate } from "./schem
2
2
  import { t as getIp } from "./get-request-ip-G2Tcmzbb.mjs";
3
3
  import { i as parseState, n as HIDE_METADATA, r as generateState, t as generateId$1 } from "./utils-C4Ub_EYH.mjs";
4
4
  import { n as symmetricEncrypt, o as signJWT, r as generateRandomString, t as symmetricDecrypt } from "./crypto-DgVHxgLL.mjs";
5
- import { c as setSessionCookie, f as getAccountCookie, h as setAccountCookie, n as deleteSessionCookie } from "./cookies-C9MZZaJ2.mjs";
6
- import { c as revokeSessions, i as listSessions, l as sensitiveSessionMiddleware, n as getSession, o as revokeOtherSessions, r as getSessionFromCtx, s as revokeSession, t as freshSessionMiddleware, u as sessionMiddleware } from "./session-DzeN0NAi.mjs";
5
+ import { c as setSessionCookie, f as getAccountCookie, h as setAccountCookie, n as deleteSessionCookie } from "./cookies-CT1-kARg.mjs";
6
+ import { c as revokeSessions, i as listSessions, l as sensitiveSessionMiddleware, n as getSession, o as revokeOtherSessions, r as getSessionFromCtx, s as revokeSession, t as freshSessionMiddleware, u as sessionMiddleware } from "./session-BYq-s4dF.mjs";
7
7
  import { hasRequestState, runWithEndpointContext, runWithRequestState, runWithTransaction } from "@better-auth/core/context";
8
8
  import { isDevelopment, isProduction, logger, shouldPublishLog } from "@better-auth/core/env";
9
9
  import { BASE_ERROR_CODES } from "@better-auth/core/error";
@@ -256,7 +256,7 @@ function getRateLimitStorage(ctx, rateLimitSettings) {
256
256
  }
257
257
  async function onRequestRateLimit(req, ctx) {
258
258
  if (!ctx.rateLimit.enabled) return;
259
- const path = new URL(req.url).pathname.replace(ctx.options.basePath || "/api/auth", "").replace(/\/+$/, "");
259
+ const path = new URL(req.url).pathname.replace(ctx.options.basePath || "/api/auth", "");
260
260
  let window = ctx.rateLimit.window;
261
261
  let max = ctx.rateLimit.max;
262
262
  const ip = getIp(req, ctx.options);
@@ -2352,7 +2352,10 @@ const signUpEmail = () => createAuthEndpoint("/sign-up/email", {
2352
2352
  if (isDevelopment()) ctx.context.logger.error("Failed to create user", e);
2353
2353
  if (e instanceof APIError) throw e;
2354
2354
  ctx.context.logger?.error("Failed to create user", e);
2355
- throw new APIError("UNPROCESSABLE_ENTITY", { message: BASE_ERROR_CODES.FAILED_TO_CREATE_USER });
2355
+ throw new APIError("UNPROCESSABLE_ENTITY", {
2356
+ message: BASE_ERROR_CODES.FAILED_TO_CREATE_USER,
2357
+ details: e
2358
+ });
2356
2359
  }
2357
2360
  if (!createdUser) throw new APIError("UNPROCESSABLE_ENTITY", { message: BASE_ERROR_CODES.FAILED_TO_CREATE_USER });
2358
2361
  await ctx.context.internalAdapter.linkAccount({
@@ -3175,8 +3178,8 @@ const router = (ctx, options) => {
3175
3178
  allowedMediaTypes: ["application/json"],
3176
3179
  async onRequest(req) {
3177
3180
  const disabledPaths = ctx.options.disabledPaths || [];
3178
- const pathname = new URL(req.url).pathname.replace(/\/+$/, "") || "/";
3179
- const normalizedPath = basePath === "/" ? pathname : pathname.startsWith(basePath) ? pathname.slice(basePath.length).replace(/\/+$/, "") || "/" : pathname;
3181
+ const pathname = new URL(req.url).pathname;
3182
+ const normalizedPath = basePath === "/" ? pathname : pathname.startsWith(basePath) ? pathname.slice(basePath.length) || "/" : pathname;
3180
3183
  if (disabledPaths.includes(normalizedPath)) return new Response("Not Found", { status: 404 });
3181
3184
  for (const plugin of ctx.options.plugins || []) if (plugin.onRequest) {
3182
3185
  const response = await plugin.onRequest(req, ctx);
@@ -1,4 +1,4 @@
1
- import { mt as Auth } from "../index-C6JlLkZw.mjs";
1
+ import { mt as Auth } from "../index-BZSqJoCN.mjs";
2
2
  import "../plugins-DLdyc73z.mjs";
3
3
  import { BetterAuthOptions } from "@better-auth/core";
4
4
 
@@ -3,12 +3,12 @@ import { f as getBaseAdapter } from "../get-migration-CDvYpogu.mjs";
3
3
  import "../schema-dfOF7vRb.mjs";
4
4
  import "../get-request-ip-G2Tcmzbb.mjs";
5
5
  import "../utils-C4Ub_EYH.mjs";
6
- import "../api-Btgd2bgm.mjs";
6
+ import "../api-D0cF0fk5.mjs";
7
7
  import "../crypto-DgVHxgLL.mjs";
8
- import "../cookies-C9MZZaJ2.mjs";
8
+ import "../cookies-CT1-kARg.mjs";
9
9
  import "../url-B7VXiggp.mjs";
10
- import "../session-DzeN0NAi.mjs";
11
- import { n as createAuthContext, t as createBetterAuth } from "../base-DXLar-6_.mjs";
10
+ import "../session-BYq-s4dF.mjs";
11
+ import { n as createAuthContext, t as createBetterAuth } from "../base-vYFdAXPf.mjs";
12
12
  import "../password-BRmR7rWA.mjs";
13
13
  import { BetterAuthError } from "@better-auth/core/error";
14
14
 
@@ -1,6 +1,6 @@
1
1
  import { n as getKyselyDatabaseType } from "./dialect-BHuPIP4Z.mjs";
2
2
  import { d as getAdapter, t as getMigrations } from "./get-migration-CDvYpogu.mjs";
3
- import { n as createAuthContext, t as createBetterAuth } from "./base-DXLar-6_.mjs";
3
+ import { n as createAuthContext, t as createBetterAuth } from "./base-vYFdAXPf.mjs";
4
4
  import { BetterAuthError } from "@better-auth/core/error";
5
5
 
6
6
  //#region src/context/init.ts
@@ -1,8 +1,8 @@
1
1
  import { o as createInternalAdapter } from "./get-migration-CDvYpogu.mjs";
2
2
  import { t as generateId } from "./utils-C4Ub_EYH.mjs";
3
- import { L as wildcardMatch, a as getEndpoints, n as checkEndpointConflicts, s as router } from "./api-Btgd2bgm.mjs";
3
+ import { L as wildcardMatch, a as getEndpoints, n as checkEndpointConflicts, s as router } from "./api-D0cF0fk5.mjs";
4
4
  import { a as verifyPassword, i as hashPassword } from "./crypto-DgVHxgLL.mjs";
5
- import { i as getCookies, t as createCookieGetter } from "./cookies-C9MZZaJ2.mjs";
5
+ import { i as getCookies, t as createCookieGetter } from "./cookies-CT1-kARg.mjs";
6
6
  import { i as getProtocol, n as getHost, r as getOrigin, t as getBaseURL } from "./url-B7VXiggp.mjs";
7
7
  import { t as checkPassword } from "./password-BRmR7rWA.mjs";
8
8
  import { runWithAdapter } from "@better-auth/core/context";
@@ -1,4 +1,4 @@
1
- import { l as parseSetCookieHeader } from "./cookies-C9MZZaJ2.mjs";
1
+ import { l as parseSetCookieHeader } from "./cookies-CT1-kARg.mjs";
2
2
  import { serializeSignedCookie } from "better-call";
3
3
  import { createAuthMiddleware } from "@better-auth/core/api";
4
4
  import { createHMAC } from "@better-auth/utils/hmac";
@@ -1,27 +1,27 @@
1
- import { $t as IsSignal, Bt as AtomListener, Gt as ClientStore, Ht as BetterAuthClientPlugin, Jt as InferClientAPI, Kt as InferActions, Qt as InferUserFromClient, Ut as ClientAtomListener, Vt as BetterAuthClientOptions, Wt as ClientOptions, Xt as InferPluginsFromClient, Yt as InferErrorCodes, Zt as InferSessionFromClient, en as SessionQueryParams, qt as InferAdditionalFromClient, tn as Store } from "../index-C6JlLkZw.mjs";
1
+ import { $t as IsSignal, Bt as AtomListener, Gt as ClientStore, Ht as BetterAuthClientPlugin, Jt as InferClientAPI, Kt as InferActions, Qt as InferUserFromClient, Ut as ClientAtomListener, Vt as BetterAuthClientOptions, Wt as ClientOptions, Xt as InferPluginsFromClient, Yt as InferErrorCodes, Zt as InferSessionFromClient, en as SessionQueryParams, qt as InferAdditionalFromClient, tn as Store } from "../index-BZSqJoCN.mjs";
2
2
  import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, g as WithoutEmpty, h as UnionToIntersection, i as HasRequiredKeys, l as PreserveJSDoc, m as StripEmptyObjects, n as DeepPartial, o as LiteralString, p as RequiredKeysOf, r as Expand, s as LiteralUnion, t as Awaitable, u as Prettify } from "../helper-BBvhhJRX.mjs";
3
3
  import "../plugins-DLdyc73z.mjs";
4
4
  import { a as Role, c as Subset, i as AccessControl, n as createAccessControl, o as Statements, r as role, s as SubArray, t as AuthorizeResponse } from "../index-B1fASdrI.mjs";
5
- import { A as organizationRoleSchema, B as memberAc, C as TeamInput, D as invitationSchema, E as defaultRolesSchema, F as OrganizationOptions, I as adminAc, L as defaultAc, M as roleSchema, N as teamMemberSchema, O as invitationStatus, P as teamSchema, R as defaultRoles, S as Team, T as TeamMemberInput, V as ownerAc, _ as MemberInput, a as organization, b as OrganizationRole, c as InferMember, d as InferOrganizationZodRolesFromOption, f as InferTeam, g as Member, h as InvitationStatus, i as TeamEndpoints, j as organizationSchema, k as memberSchema, l as InferOrganization, m as InvitationInput, n as OrganizationEndpoints, o as parseRoles, p as Invitation, r as OrganizationPlugin, s as InferInvitation, t as DynamicAccessControlEndpoints, u as InferOrganizationRolesFromOption, v as Organization, w as TeamMember, x as OrganizationSchema, y as OrganizationInput, z as defaultStatements } from "../index-7_n2Onxy.mjs";
6
- import "../index-Dv8SEq_Z.mjs";
7
- import "../index-tiYKFe5k.mjs";
5
+ import { A as organizationRoleSchema, B as memberAc, C as TeamInput, D as invitationSchema, E as defaultRolesSchema, F as OrganizationOptions, I as adminAc, L as defaultAc, M as roleSchema, N as teamMemberSchema, O as invitationStatus, P as teamSchema, R as defaultRoles, S as Team, T as TeamMemberInput, V as ownerAc, _ as MemberInput, a as organization, b as OrganizationRole, c as InferMember, d as InferOrganizationZodRolesFromOption, f as InferTeam, g as Member, h as InvitationStatus, i as TeamEndpoints, j as organizationSchema, k as memberSchema, l as InferOrganization, m as InvitationInput, n as OrganizationEndpoints, o as parseRoles, p as Invitation, r as OrganizationPlugin, s as InferInvitation, t as DynamicAccessControlEndpoints, u as InferOrganizationRolesFromOption, v as Organization, w as TeamMember, x as OrganizationSchema, y as OrganizationInput, z as defaultStatements } from "../index-K6Y-wVlZ.mjs";
6
+ import "../index-CRKlsq0c.mjs";
7
+ import "../index-CpKH-xWB.mjs";
8
8
  import "../index-CNMCZNM-.mjs";
9
- import "../index-Dvwu5Hj9.mjs";
10
- import "../index-DozBmQMU.mjs";
11
- import "../index-B9_77v0f.mjs";
12
- import "../index-C_t-hZXK.mjs";
13
- import "../index-Dn7rFwsf.mjs";
14
- import "../index-CfASVIzV.mjs";
15
- import "../index-NphISEhZ.mjs";
16
- import "../index-B3CSW56D.mjs";
17
- import "../index-BwB7s4Pk.mjs";
18
- import "../index-Cg12btK0.mjs";
19
- import "../index-DAWHK5U0.mjs";
20
- import "../index-DZ8eC6CZ.mjs";
21
- import "../index-CU9sNB4D.mjs";
22
- import "../index-C4YXDQqI.mjs";
23
- import "../index-B6HepD87.mjs";
24
- import "../index-CTZv2mQK.mjs";
9
+ import "../index-Bc5A5Xje.mjs";
10
+ import "../index-iRK1LqiD.mjs";
11
+ import "../index-BInUfw2R.mjs";
12
+ import "../index-CkZRXsqi.mjs";
13
+ import "../index-Bd216dFj.mjs";
14
+ import "../index-B01OM6Wg.mjs";
15
+ import "../index-C3Osl3iH.mjs";
16
+ import "../index-Cm6yBUc4.mjs";
17
+ import "../index-CircvHXF.mjs";
18
+ import "../index-D4n3RgcF.mjs";
19
+ import "../index-CTqO-57U.mjs";
20
+ import "../index-DOcLs18d.mjs";
21
+ import "../index-BpQUAVLc.mjs";
22
+ import "../index-CmCL4oIp.mjs";
23
+ import "../index-D6frN7IY.mjs";
24
+ import "../index-DF8xqi-5.mjs";
25
25
  import { BetterAuthClientOptions as BetterAuthClientOptions$1, BetterAuthClientPlugin as BetterAuthClientPlugin$1, BetterAuthOptions, BetterAuthPlugin, ClientFetchOption } from "@better-auth/core";
26
26
  import { Primitive } from "@better-auth/core/db";
27
27
  import { BASE_ERROR_CODES } from "@better-auth/core/error";
@@ -1,11 +1,11 @@
1
- import { $t as IsSignal, Jt as InferClientAPI, Kt as InferActions, Yt as InferErrorCodes, en as SessionQueryParams } from "../../index-C6JlLkZw.mjs";
1
+ import { $t as IsSignal, Jt as InferClientAPI, Kt as InferActions, Yt as InferErrorCodes, en as SessionQueryParams } from "../../index-BZSqJoCN.mjs";
2
2
  import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, f as Primitive, g as WithoutEmpty, h as UnionToIntersection, i as HasRequiredKeys, l as PreserveJSDoc, m as StripEmptyObjects, n as DeepPartial, o as LiteralString, p as RequiredKeysOf, r as Expand, s as LiteralUnion, t as Awaitable, u as Prettify } from "../../helper-BBvhhJRX.mjs";
3
3
  import "../../plugins-DLdyc73z.mjs";
4
4
  import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
5
5
  import { BASE_ERROR_CODES } from "@better-auth/core/error";
6
- import * as nanostores2 from "nanostores";
6
+ import * as nanostores0 from "nanostores";
7
7
  import { Store, StoreValue } from "nanostores";
8
- import * as _better_fetch_fetch63 from "@better-fetch/fetch";
8
+ import * as _better_fetch_fetch0 from "@better-fetch/fetch";
9
9
  import { BetterFetchError } from "@better-fetch/fetch";
10
10
  import { DependencyList } from "@lynx-js/react";
11
11
  export * from "nanostores";
@@ -93,21 +93,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
93
93
  error: null;
94
94
  } ? S : Res : never>;
95
95
  };
96
- $fetch: _better_fetch_fetch63.BetterFetch<{
97
- plugins: (_better_fetch_fetch63.BetterFetchPlugin | {
96
+ $fetch: _better_fetch_fetch0.BetterFetch<{
97
+ plugins: (_better_fetch_fetch0.BetterFetchPlugin | {
98
98
  id: string;
99
99
  name: string;
100
100
  hooks: {
101
- onSuccess(context: _better_fetch_fetch63.SuccessContext<any>): void;
101
+ onSuccess(context: _better_fetch_fetch0.SuccessContext<any>): void;
102
102
  };
103
103
  } | {
104
104
  id: string;
105
105
  name: string;
106
106
  hooks: {
107
- onSuccess: ((context: _better_fetch_fetch63.SuccessContext<any>) => Promise<void> | void) | undefined;
108
- onError: ((context: _better_fetch_fetch63.ErrorContext) => Promise<void> | void) | undefined;
109
- onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch63.RequestContext<T>) => Promise<_better_fetch_fetch63.RequestContext | void> | _better_fetch_fetch63.RequestContext | void) | undefined;
110
- onResponse: ((context: _better_fetch_fetch63.ResponseContext) => Promise<Response | void | _better_fetch_fetch63.ResponseContext> | Response | _better_fetch_fetch63.ResponseContext | void) | undefined;
107
+ onSuccess: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
108
+ onError: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
109
+ onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
110
+ onResponse: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
111
111
  };
112
112
  })[];
113
113
  cache?: RequestCache | undefined;
@@ -127,12 +127,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
127
127
  referrerPolicy?: ReferrerPolicy | undefined;
128
128
  signal?: (AbortSignal | null) | undefined;
129
129
  window?: null | undefined;
130
- onRetry?: ((response: _better_fetch_fetch63.ResponseContext) => Promise<void> | void) | undefined;
130
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
131
131
  hookOptions?: {
132
132
  cloneResponse?: boolean;
133
133
  } | undefined;
134
134
  timeout?: number | undefined;
135
- customFetchImpl: _better_fetch_fetch63.FetchEsque;
135
+ customFetchImpl: _better_fetch_fetch0.FetchEsque;
136
136
  baseURL: string;
137
137
  throw?: boolean | undefined;
138
138
  auth?: ({
@@ -152,17 +152,17 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
152
152
  params?: any;
153
153
  duplex?: "full" | "half" | undefined;
154
154
  jsonParser: (text: string) => Promise<any> | any;
155
- retry?: _better_fetch_fetch63.RetryOptions | undefined;
155
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
156
156
  retryAttempt?: number | undefined;
157
- output?: (_better_fetch_fetch63.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
158
- errorSchema?: _better_fetch_fetch63.StandardSchemaV1 | undefined;
157
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
158
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
159
159
  disableValidation?: boolean | undefined;
160
160
  disableSignal?: boolean | undefined;
161
161
  }, unknown, unknown, {}>;
162
162
  $store: {
163
163
  notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
164
164
  listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
165
- atoms: Record<string, nanostores2.WritableAtom<any>>;
165
+ atoms: Record<string, nanostores0.WritableAtom<any>>;
166
166
  };
167
167
  $ERROR_CODES: PrettifyDeep<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
168
168
  };
@@ -1,33 +1,33 @@
1
- import { Sn as InferAdditionalFieldsFromPluginOptions, dt as BetterAuthOptions$1, en as SessionQueryParams } from "../../index-C6JlLkZw.mjs";
1
+ import { Sn as InferAdditionalFieldsFromPluginOptions, dt as BetterAuthOptions$1, en as SessionQueryParams } from "../../index-BZSqJoCN.mjs";
2
2
  import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, f as Primitive, g as WithoutEmpty, h as UnionToIntersection, i as HasRequiredKeys, l as PreserveJSDoc, m as StripEmptyObjects, n as DeepPartial, o as LiteralString, p as RequiredKeysOf, r as Expand, s as LiteralUnion, t as Awaitable, u as Prettify } from "../../helper-BBvhhJRX.mjs";
3
3
  import "../../plugins-DLdyc73z.mjs";
4
4
  import { a as Role, i as AccessControl, o as Statements } from "../../index-B1fASdrI.mjs";
5
- import { A as organizationRoleSchema, C as TeamInput, D as invitationSchema, E as defaultRolesSchema, F as OrganizationOptions, M as roleSchema, N as teamMemberSchema, O as invitationStatus, P as teamSchema, S as Team, T as TeamMemberInput, _ as MemberInput, _t as admin, at as OAuthAccessToken, b as OrganizationRole, bt as SessionWithImpersonatedBy, c as InferMember, ct as TokenBody, d as InferOrganizationZodRolesFromOption, f as InferTeam, g as Member, gt as ApiKeyOptions, h as InvitationStatus, ht as ApiKey, it as CodeVerificationValue, j as organizationSchema, k as memberSchema, l as InferOrganization, m as InvitationInput, nt as AuthorizationQuery, ot as OIDCMetadata, p as Invitation, pt as apiKey, r as OrganizationPlugin, rt as Client, s as InferInvitation, st as OIDCOptions, tt as oidcProvider, u as InferOrganizationRolesFromOption, v as Organization, vt as AdminOptions, w as TeamMember, x as OrganizationSchema, xt as UserWithRole, y as OrganizationInput, yt as InferAdminRolesFromOption } from "../../index-7_n2Onxy.mjs";
6
- import { i as schema, n as AnonymousOptions, r as UserWithAnonymous, t as anonymous } from "../../index-Dv8SEq_Z.mjs";
7
- import "../../index-tiYKFe5k.mjs";
5
+ import { A as organizationRoleSchema, C as TeamInput, D as invitationSchema, E as defaultRolesSchema, F as OrganizationOptions, M as roleSchema, N as teamMemberSchema, O as invitationStatus, P as teamSchema, S as Team, T as TeamMemberInput, _ as MemberInput, _t as admin, at as OAuthAccessToken, b as OrganizationRole, bt as SessionWithImpersonatedBy, c as InferMember, ct as TokenBody, d as InferOrganizationZodRolesFromOption, f as InferTeam, g as Member, gt as ApiKeyOptions, h as InvitationStatus, ht as ApiKey, it as CodeVerificationValue, j as organizationSchema, k as memberSchema, l as InferOrganization, m as InvitationInput, nt as AuthorizationQuery, ot as OIDCMetadata, p as Invitation, pt as apiKey, r as OrganizationPlugin, rt as Client, s as InferInvitation, st as OIDCOptions, tt as oidcProvider, u as InferOrganizationRolesFromOption, v as Organization, vt as AdminOptions, w as TeamMember, x as OrganizationSchema, xt as UserWithRole, y as OrganizationInput, yt as InferAdminRolesFromOption } from "../../index-K6Y-wVlZ.mjs";
6
+ import { i as schema, n as AnonymousOptions, r as UserWithAnonymous, t as anonymous } from "../../index-CRKlsq0c.mjs";
7
+ import "../../index-CpKH-xWB.mjs";
8
8
  import "../../index-CNMCZNM-.mjs";
9
- import "../../index-Dvwu5Hj9.mjs";
10
- import { n as deviceAuthorization } from "../../index-DozBmQMU.mjs";
11
- import { t as emailOTP } from "../../index-B9_77v0f.mjs";
12
- import { _ as GenericOAuthConfig, a as OktaOptions, c as microsoftEntraId, d as KeycloakOptions, f as keycloak, g as auth0, h as Auth0Options, i as slack, l as LineOptions, m as hubspot, n as genericOAuth, o as okta, p as HubSpotOptions, r as SlackOptions, s as MicrosoftEntraIdOptions, t as BaseOAuthProviderOptions, u as line, v as GenericOAuthOptions } from "../../index-C_t-hZXK.mjs";
13
- import "../../index-Dn7rFwsf.mjs";
14
- import { c as Jwk, l as JwtOptions, o as JWKOptions, s as JWSAlgorithms, t as jwt } from "../../index-CfASVIzV.mjs";
15
- import { n as magicLink } from "../../index-NphISEhZ.mjs";
16
- import { n as multiSession, t as MultiSessionConfig } from "../../index-B3CSW56D.mjs";
17
- import "../../index-BwB7s4Pk.mjs";
18
- import "../../index-Cg12btK0.mjs";
19
- import { n as oneTimeToken, t as OneTimeTokenOptions } from "../../index-DAWHK5U0.mjs";
20
- import "../../index-DZ8eC6CZ.mjs";
21
- import { n as PhoneNumberOptions, r as UserWithPhoneNumber, t as phoneNumber } from "../../index-CU9sNB4D.mjs";
22
- import { n as siwe } from "../../index-C4YXDQqI.mjs";
23
- import { a as TwoFactorProvider, c as TOTPOptions, d as otp2fa, f as BackupCodeOptions, g as verifyBackupCode, h as getBackupCodes, i as TwoFactorOptions, l as totp2fa, m as generateBackupCodes, n as twoFactorClient, o as TwoFactorTable, p as backupCode2fa, s as UserWithTwoFactor, u as OTPOptions } from "../../index-B6HepD87.mjs";
24
- import { n as username } from "../../index-CTZv2mQK.mjs";
25
- import * as _better_auth_core25 from "@better-auth/core";
9
+ import "../../index-Bc5A5Xje.mjs";
10
+ import { n as deviceAuthorization } from "../../index-iRK1LqiD.mjs";
11
+ import { t as emailOTP } from "../../index-BInUfw2R.mjs";
12
+ import { _ as GenericOAuthConfig, a as OktaOptions, c as microsoftEntraId, d as KeycloakOptions, f as keycloak, g as auth0, h as Auth0Options, i as slack, l as LineOptions, m as hubspot, n as genericOAuth, o as okta, p as HubSpotOptions, r as SlackOptions, s as MicrosoftEntraIdOptions, t as BaseOAuthProviderOptions, u as line, v as GenericOAuthOptions } from "../../index-CkZRXsqi.mjs";
13
+ import "../../index-Bd216dFj.mjs";
14
+ import { c as Jwk, l as JwtOptions, o as JWKOptions, s as JWSAlgorithms, t as jwt } from "../../index-B01OM6Wg.mjs";
15
+ import { n as magicLink } from "../../index-C3Osl3iH.mjs";
16
+ import { n as multiSession, t as MultiSessionConfig } from "../../index-Cm6yBUc4.mjs";
17
+ import "../../index-CircvHXF.mjs";
18
+ import "../../index-D4n3RgcF.mjs";
19
+ import { n as oneTimeToken, t as OneTimeTokenOptions } from "../../index-CTqO-57U.mjs";
20
+ import "../../index-DOcLs18d.mjs";
21
+ import { n as PhoneNumberOptions, r as UserWithPhoneNumber, t as phoneNumber } from "../../index-BpQUAVLc.mjs";
22
+ import { n as siwe } from "../../index-CmCL4oIp.mjs";
23
+ import { a as TwoFactorProvider, c as TOTPOptions, d as otp2fa, f as BackupCodeOptions, g as verifyBackupCode, h as getBackupCodes, i as TwoFactorOptions, l as totp2fa, m as generateBackupCodes, n as twoFactorClient, o as TwoFactorTable, p as backupCode2fa, s as UserWithTwoFactor, u as OTPOptions } from "../../index-D6frN7IY.mjs";
24
+ import { n as username } from "../../index-DF8xqi-5.mjs";
25
+ import * as _better_auth_core28 from "@better-auth/core";
26
26
  import { BetterAuthOptions, BetterAuthPlugin, ClientFetchOption } from "@better-auth/core";
27
27
  import { DBFieldAttribute } from "@better-auth/core/db";
28
28
  import { JSONWebKeySet } from "jose";
29
29
  import * as nanostores6 from "nanostores";
30
- import * as _better_fetch_fetch111 from "@better-fetch/fetch";
30
+ import * as _better_fetch_fetch114 from "@better-fetch/fetch";
31
31
  import { Auth } from "better-auth";
32
32
 
33
33
  //#region src/plugins/additional-fields/client.d.ts
@@ -264,7 +264,7 @@ declare const jwtClient: (options?: JwtClientOptions) => {
264
264
  pathMethods: {
265
265
  [x: string]: "GET";
266
266
  };
267
- getActions: ($fetch: _better_fetch_fetch111.BetterFetch) => {
267
+ getActions: ($fetch: _better_fetch_fetch114.BetterFetch) => {
268
268
  jwks: (fetchOptions?: any) => Promise<{
269
269
  data: null;
270
270
  error: {
@@ -322,9 +322,19 @@ declare const magicLinkClient: () => {
322
322
  };
323
323
  //#endregion
324
324
  //#region src/plugins/multi-session/client.d.ts
325
- declare const multiSessionClient: () => {
325
+ type MultiSessionClientOptions = {
326
+ schema?: {
327
+ user?: {
328
+ additionalFields?: Record<string, DBFieldAttribute> | undefined;
329
+ } | undefined;
330
+ session?: {
331
+ additionalFields?: Record<string, DBFieldAttribute> | undefined;
332
+ } | undefined;
333
+ } | undefined;
334
+ };
335
+ declare const multiSessionClient: <O$1 extends MultiSessionClientOptions>(options?: O$1 | undefined) => {
326
336
  id: "multi-session";
327
- $InferServerPlugin: ReturnType<typeof multiSession>;
337
+ $InferServerPlugin: ReturnType<typeof multiSession<O$1>>;
328
338
  atomListeners: {
329
339
  matcher(path: string): path is "/multi-session/set-active";
330
340
  signal: "$sessionSignal";
@@ -427,13 +437,13 @@ declare const oneTapClient: (options: GoogleOneTapOptions) => {
427
437
  id: string;
428
438
  name: string;
429
439
  hooks: {
430
- onResponse(ctx: _better_fetch_fetch111.ResponseContext): Promise<void>;
440
+ onResponse(ctx: _better_fetch_fetch114.ResponseContext): Promise<void>;
431
441
  };
432
442
  }[];
433
- getActions: ($fetch: _better_fetch_fetch111.BetterFetch, _: _better_auth_core25.ClientStore) => {
443
+ getActions: ($fetch: _better_fetch_fetch114.BetterFetch, _: _better_auth_core28.ClientStore) => {
434
444
  oneTap: (opts?: GoogleOneTapActionOptions | undefined, fetchOptions?: ClientFetchOption | undefined) => Promise<void>;
435
445
  };
436
- getAtoms($fetch: _better_fetch_fetch111.BetterFetch): {};
446
+ getAtoms($fetch: _better_fetch_fetch114.BetterFetch): {};
437
447
  };
438
448
  //#endregion
439
449
  //#region src/plugins/one-time-token/client.d.ts
@@ -532,7 +542,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
532
542
  } ? true : false;
533
543
  };
534
544
  }>;
535
- getActions: ($fetch: _better_fetch_fetch111.BetterFetch, _$store: _better_auth_core25.ClientStore, co: _better_auth_core25.BetterAuthClientOptions | undefined) => {
545
+ getActions: ($fetch: _better_fetch_fetch114.BetterFetch, _$store: _better_auth_core28.ClientStore, co: _better_auth_core28.BetterAuthClientOptions | undefined) => {
536
546
  $Infer: {
537
547
  ActiveOrganization: CO["teams"] extends {
538
548
  enabled: true;
@@ -616,7 +626,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
616
626
  }) => boolean;
617
627
  };
618
628
  };
619
- getAtoms: ($fetch: _better_fetch_fetch111.BetterFetch) => {
629
+ getAtoms: ($fetch: _better_fetch_fetch114.BetterFetch) => {
620
630
  $listOrg: nanostores6.PreinitializedWritableAtom<boolean> & object;
621
631
  $activeOrgSignal: nanostores6.PreinitializedWritableAtom<boolean> & object;
622
632
  $activeMemberSignal: nanostores6.PreinitializedWritableAtom<boolean> & object;
@@ -633,7 +643,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
633
643
  members: InferMember<CO, false>[];
634
644
  invitations: InferInvitation<CO, false>[];
635
645
  }> | null;
636
- error: null | _better_fetch_fetch111.BetterFetchError;
646
+ error: null | _better_fetch_fetch114.BetterFetchError;
637
647
  isPending: boolean;
638
648
  isRefetching: boolean;
639
649
  refetch: (queryParams?: {
@@ -649,7 +659,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
649
659
  logo?: string | null | undefined;
650
660
  metadata?: any;
651
661
  } & InferAdditionalFieldsFromPluginOptions<"organization", CO, false> extends infer T_1 ? { [K in keyof T_1]: T_1[K] } : never)[] | null;
652
- error: null | _better_fetch_fetch111.BetterFetchError;
662
+ error: null | _better_fetch_fetch114.BetterFetchError;
653
663
  isPending: boolean;
654
664
  isRefetching: boolean;
655
665
  refetch: (queryParams?: {
@@ -664,7 +674,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
664
674
  role: string;
665
675
  createdAt: Date;
666
676
  } | null;
667
- error: null | _better_fetch_fetch111.BetterFetchError;
677
+ error: null | _better_fetch_fetch114.BetterFetchError;
668
678
  isPending: boolean;
669
679
  isRefetching: boolean;
670
680
  refetch: (queryParams?: {
@@ -675,7 +685,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
675
685
  data: {
676
686
  role: string;
677
687
  } | null;
678
- error: null | _better_fetch_fetch111.BetterFetchError;
688
+ error: null | _better_fetch_fetch114.BetterFetchError;
679
689
  isPending: boolean;
680
690
  isRefetching: boolean;
681
691
  refetch: (queryParams?: {
@@ -838,4 +848,4 @@ declare const InferServerPlugin: <AuthOrOption extends BetterAuthOptions | {
838
848
  } ? P : never : never;
839
849
  };
840
850
  //#endregion
841
- export { AdminOptions, AnonymousOptions, ApiKey, ApiKeyClientPlugin, ApiKeyOptions, Auth0Options, AuthorizationQuery, Awaitable, BackupCodeOptions, type BaseOAuthProviderOptions, Client, CodeVerificationValue, DeepPartial, Expand, type GenericOAuthConfig, type GenericOAuthOptions, GoogleOneTapActionOptions, GoogleOneTapOptions, HasRequiredKeys, HubSpotOptions, InferAdminRolesFromOption, InferInvitation, InferMember, InferOrganization, InferOrganizationRolesFromOption, InferOrganizationZodRolesFromOption, InferServerPlugin, InferTeam, Invitation, InvitationInput, InvitationStatus, JWKOptions, JWSAlgorithms, Jwk, JwtOptions, KeycloakOptions, LastLoginMethodClientConfig, LineOptions, LiteralNumber, LiteralString, LiteralUnion, Member, MemberInput, MicrosoftEntraIdOptions, type MultiSessionConfig, OAuthAccessToken, OIDCMetadata, OIDCOptions, OTPOptions, OidcClientPlugin, OktaOptions, OmitId, type OneTimeTokenOptions, Organization, OrganizationInput, OrganizationRole, OrganizationSchema, PhoneNumberOptions, PreserveJSDoc, Prettify, PrettifyDeep, Primitive, RequiredKeysOf, SessionWithImpersonatedBy, SlackOptions, StripEmptyObjects, TOTPOptions, Team, TeamInput, TeamMember, TeamMemberInput, TokenBody, TwoFactorOptions, TwoFactorProvider, TwoFactorTable, UnionToIntersection, UserWithAnonymous, UserWithPhoneNumber, UserWithRole, UserWithTwoFactor, WithoutEmpty, adminClient, anonymousClient, apiKeyClient, auth0, backupCode2fa, clientSideHasPermission, customSessionClient, defaultRolesSchema, deviceAuthorizationClient, emailOTPClient, generateBackupCodes, genericOAuthClient, getBackupCodes, hubspot, inferAdditionalFields, inferOrgAdditionalFields, invitationSchema, invitationStatus, jwtClient, keycloak, lastLoginMethodClient, line, magicLinkClient, memberSchema, microsoftEntraId, multiSessionClient, oidcClient, okta, oneTapClient, oneTimeTokenClient, organizationClient, organizationRoleSchema, organizationSchema, otp2fa, phoneNumberClient, roleSchema, schema, siweClient, slack, teamMemberSchema, teamSchema, totp2fa, twoFactorClient, usernameClient, verifyBackupCode };
851
+ export { AdminOptions, AnonymousOptions, ApiKey, ApiKeyClientPlugin, ApiKeyOptions, Auth0Options, AuthorizationQuery, Awaitable, BackupCodeOptions, type BaseOAuthProviderOptions, Client, CodeVerificationValue, DeepPartial, Expand, type GenericOAuthConfig, type GenericOAuthOptions, GoogleOneTapActionOptions, GoogleOneTapOptions, HasRequiredKeys, HubSpotOptions, InferAdminRolesFromOption, InferInvitation, InferMember, InferOrganization, InferOrganizationRolesFromOption, InferOrganizationZodRolesFromOption, InferServerPlugin, InferTeam, Invitation, InvitationInput, InvitationStatus, JWKOptions, JWSAlgorithms, Jwk, JwtOptions, KeycloakOptions, LastLoginMethodClientConfig, LineOptions, LiteralNumber, LiteralString, LiteralUnion, Member, MemberInput, MicrosoftEntraIdOptions, MultiSessionClientOptions, type MultiSessionConfig, OAuthAccessToken, OIDCMetadata, OIDCOptions, OTPOptions, OidcClientPlugin, OktaOptions, OmitId, type OneTimeTokenOptions, Organization, OrganizationInput, OrganizationRole, OrganizationSchema, PhoneNumberOptions, PreserveJSDoc, Prettify, PrettifyDeep, Primitive, RequiredKeysOf, SessionWithImpersonatedBy, SlackOptions, StripEmptyObjects, TOTPOptions, Team, TeamInput, TeamMember, TeamMemberInput, TokenBody, TwoFactorOptions, TwoFactorProvider, TwoFactorTable, UnionToIntersection, UserWithAnonymous, UserWithPhoneNumber, UserWithRole, UserWithTwoFactor, WithoutEmpty, adminClient, anonymousClient, apiKeyClient, auth0, backupCode2fa, clientSideHasPermission, customSessionClient, defaultRolesSchema, deviceAuthorizationClient, emailOTPClient, generateBackupCodes, genericOAuthClient, getBackupCodes, hubspot, inferAdditionalFields, inferOrgAdditionalFields, invitationSchema, invitationStatus, jwtClient, keycloak, lastLoginMethodClient, line, magicLinkClient, memberSchema, microsoftEntraId, multiSessionClient, oidcClient, okta, oneTapClient, oneTimeTokenClient, organizationClient, organizationRoleSchema, organizationSchema, otp2fa, phoneNumberClient, roleSchema, schema, siweClient, slack, teamMemberSchema, teamSchema, totp2fa, twoFactorClient, usernameClient, verifyBackupCode };
@@ -176,7 +176,7 @@ const magicLinkClient = () => {
176
176
 
177
177
  //#endregion
178
178
  //#region src/plugins/multi-session/client.ts
179
- const multiSessionClient = () => {
179
+ const multiSessionClient = (options) => {
180
180
  return {
181
181
  id: "multi-session",
182
182
  $InferServerPlugin: {},
@@ -1,11 +1,11 @@
1
- import { $t as IsSignal, Jt as InferClientAPI, Kt as InferActions, Yt as InferErrorCodes, en as SessionQueryParams } from "../../index-C6JlLkZw.mjs";
1
+ import { $t as IsSignal, Jt as InferClientAPI, Kt as InferActions, Yt as InferErrorCodes, en as SessionQueryParams } from "../../index-BZSqJoCN.mjs";
2
2
  import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, f as Primitive, g as WithoutEmpty, h as UnionToIntersection, i as HasRequiredKeys, l as PreserveJSDoc, m as StripEmptyObjects, n as DeepPartial, o as LiteralString, p as RequiredKeysOf, r as Expand, s as LiteralUnion, t as Awaitable, u as Prettify } from "../../helper-BBvhhJRX.mjs";
3
3
  import "../../plugins-DLdyc73z.mjs";
4
4
  import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
5
5
  import { BASE_ERROR_CODES } from "@better-auth/core/error";
6
- import * as nanostores0 from "nanostores";
6
+ import * as nanostores2 from "nanostores";
7
7
  import { Store, StoreValue } from "nanostores";
8
- import * as _better_fetch_fetch0 from "@better-fetch/fetch";
8
+ import * as _better_fetch_fetch63 from "@better-fetch/fetch";
9
9
  import { BetterFetchError } from "@better-fetch/fetch";
10
10
  import { DependencyList } from "react";
11
11
  export * from "nanostores";
@@ -94,21 +94,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
94
94
  error: null;
95
95
  } ? S : Res : never>;
96
96
  };
97
- $fetch: _better_fetch_fetch0.BetterFetch<{
98
- plugins: (_better_fetch_fetch0.BetterFetchPlugin | {
97
+ $fetch: _better_fetch_fetch63.BetterFetch<{
98
+ plugins: (_better_fetch_fetch63.BetterFetchPlugin | {
99
99
  id: string;
100
100
  name: string;
101
101
  hooks: {
102
- onSuccess(context: _better_fetch_fetch0.SuccessContext<any>): void;
102
+ onSuccess(context: _better_fetch_fetch63.SuccessContext<any>): void;
103
103
  };
104
104
  } | {
105
105
  id: string;
106
106
  name: string;
107
107
  hooks: {
108
- onSuccess: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
109
- onError: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
110
- onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
111
- onResponse: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
108
+ onSuccess: ((context: _better_fetch_fetch63.SuccessContext<any>) => Promise<void> | void) | undefined;
109
+ onError: ((context: _better_fetch_fetch63.ErrorContext) => Promise<void> | void) | undefined;
110
+ onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch63.RequestContext<T>) => Promise<_better_fetch_fetch63.RequestContext | void> | _better_fetch_fetch63.RequestContext | void) | undefined;
111
+ onResponse: ((context: _better_fetch_fetch63.ResponseContext) => Promise<Response | void | _better_fetch_fetch63.ResponseContext> | Response | _better_fetch_fetch63.ResponseContext | void) | undefined;
112
112
  };
113
113
  })[];
114
114
  cache?: RequestCache | undefined;
@@ -128,12 +128,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
128
128
  referrerPolicy?: ReferrerPolicy | undefined;
129
129
  signal?: (AbortSignal | null) | undefined;
130
130
  window?: null | undefined;
131
- onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
131
+ onRetry?: ((response: _better_fetch_fetch63.ResponseContext) => Promise<void> | void) | undefined;
132
132
  hookOptions?: {
133
133
  cloneResponse?: boolean;
134
134
  } | undefined;
135
135
  timeout?: number | undefined;
136
- customFetchImpl: _better_fetch_fetch0.FetchEsque;
136
+ customFetchImpl: _better_fetch_fetch63.FetchEsque;
137
137
  baseURL: string;
138
138
  throw?: boolean | undefined;
139
139
  auth?: ({
@@ -153,17 +153,17 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
153
153
  params?: any;
154
154
  duplex?: "full" | "half" | undefined;
155
155
  jsonParser: (text: string) => Promise<any> | any;
156
- retry?: _better_fetch_fetch0.RetryOptions | undefined;
156
+ retry?: _better_fetch_fetch63.RetryOptions | undefined;
157
157
  retryAttempt?: number | undefined;
158
- output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
159
- errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
158
+ output?: (_better_fetch_fetch63.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
159
+ errorSchema?: _better_fetch_fetch63.StandardSchemaV1 | undefined;
160
160
  disableValidation?: boolean | undefined;
161
161
  disableSignal?: boolean | undefined;
162
162
  }, unknown, unknown, {}>;
163
163
  $store: {
164
164
  notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
165
165
  listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
166
- atoms: Record<string, nanostores0.WritableAtom<any>>;
166
+ atoms: Record<string, nanostores2.WritableAtom<any>>;
167
167
  };
168
168
  $ERROR_CODES: PrettifyDeep<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
169
169
  };