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.
- package/dist/adapters/drizzle-adapter/index.d.cts +1 -1
- package/dist/adapters/drizzle-adapter/index.d.mts +1 -1
- package/dist/adapters/drizzle-adapter/index.d.ts +1 -1
- package/dist/adapters/kysely-adapter/index.d.cts +1 -1
- package/dist/adapters/kysely-adapter/index.d.mts +1 -1
- package/dist/adapters/kysely-adapter/index.d.ts +1 -1
- package/dist/adapters/memory-adapter/index.d.cts +1 -1
- package/dist/adapters/memory-adapter/index.d.mts +1 -1
- package/dist/adapters/memory-adapter/index.d.ts +1 -1
- package/dist/adapters/mongodb-adapter/index.d.cts +1 -1
- package/dist/adapters/mongodb-adapter/index.d.mts +1 -1
- package/dist/adapters/mongodb-adapter/index.d.ts +1 -1
- package/dist/adapters/prisma-adapter/index.d.cts +1 -1
- package/dist/adapters/prisma-adapter/index.d.mts +1 -1
- package/dist/adapters/prisma-adapter/index.d.ts +1 -1
- package/dist/adapters/test.d.cts +1 -1
- package/dist/adapters/test.d.mts +1 -1
- package/dist/adapters/test.d.ts +1 -1
- package/dist/api/index.d.cts +1 -1
- package/dist/api/index.d.mts +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/client/index.d.cts +3 -2
- package/dist/client/index.d.mts +3 -2
- package/dist/client/index.d.ts +3 -2
- package/dist/client/plugins/index.d.cts +3 -3
- package/dist/client/plugins/index.d.mts +3 -3
- package/dist/client/plugins/index.d.ts +3 -3
- package/dist/client/react/index.d.cts +2 -1
- package/dist/client/react/index.d.mts +2 -1
- package/dist/client/react/index.d.ts +2 -1
- package/dist/client/solid/index.d.cts +2 -2
- package/dist/client/solid/index.d.mts +2 -2
- package/dist/client/solid/index.d.ts +2 -2
- package/dist/client/svelte/index.d.cts +2 -1
- package/dist/client/svelte/index.d.mts +2 -1
- package/dist/client/svelte/index.d.ts +2 -1
- package/dist/client/vue/index.d.cts +2 -1
- package/dist/client/vue/index.d.mts +2 -1
- package/dist/client/vue/index.d.ts +2 -1
- package/dist/cookies/index.cjs +13 -3
- package/dist/cookies/index.d.cts +1 -1
- package/dist/cookies/index.d.mts +1 -1
- package/dist/cookies/index.d.ts +1 -1
- package/dist/cookies/index.mjs +13 -3
- package/dist/db/index.d.cts +2 -2
- package/dist/db/index.d.mts +2 -2
- package/dist/db/index.d.ts +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/integrations/next-js.cjs +1 -1
- package/dist/integrations/next-js.d.cts +1 -1
- package/dist/integrations/next-js.d.mts +1 -1
- package/dist/integrations/next-js.d.ts +1 -1
- package/dist/integrations/next-js.mjs +1 -1
- package/dist/integrations/node.d.cts +1 -1
- package/dist/integrations/node.d.mts +1 -1
- package/dist/integrations/node.d.ts +1 -1
- package/dist/integrations/svelte-kit.d.cts +1 -1
- package/dist/integrations/svelte-kit.d.mts +1 -1
- package/dist/integrations/svelte-kit.d.ts +1 -1
- package/dist/oauth2/index.d.cts +2 -2
- package/dist/oauth2/index.d.mts +2 -2
- package/dist/oauth2/index.d.ts +2 -2
- package/dist/plugins/admin/index.cjs +2 -2
- package/dist/plugins/admin/index.d.cts +5 -19
- package/dist/plugins/admin/index.d.mts +5 -19
- package/dist/plugins/admin/index.d.ts +5 -19
- package/dist/plugins/admin/index.mjs +2 -2
- package/dist/plugins/anonymous/index.d.cts +1 -1
- package/dist/plugins/anonymous/index.d.mts +1 -1
- package/dist/plugins/anonymous/index.d.ts +1 -1
- package/dist/plugins/bearer/index.cjs +1 -1
- package/dist/plugins/bearer/index.d.cts +1 -1
- package/dist/plugins/bearer/index.d.mts +1 -1
- package/dist/plugins/bearer/index.d.ts +1 -1
- package/dist/plugins/bearer/index.mjs +1 -1
- package/dist/plugins/custom-session/index.cjs +1 -1
- package/dist/plugins/custom-session/index.d.cts +1 -1
- package/dist/plugins/custom-session/index.d.mts +1 -1
- package/dist/plugins/custom-session/index.d.ts +1 -1
- package/dist/plugins/custom-session/index.mjs +1 -1
- package/dist/plugins/email-otp/index.d.cts +1 -1
- package/dist/plugins/email-otp/index.d.mts +1 -1
- package/dist/plugins/email-otp/index.d.ts +1 -1
- package/dist/plugins/generic-oauth/index.d.cts +1 -1
- package/dist/plugins/generic-oauth/index.d.mts +1 -1
- package/dist/plugins/generic-oauth/index.d.ts +1 -1
- package/dist/plugins/index.cjs +2 -2
- package/dist/plugins/index.d.cts +4 -4
- package/dist/plugins/index.d.mts +4 -4
- package/dist/plugins/index.d.ts +4 -4
- package/dist/plugins/index.mjs +2 -2
- package/dist/plugins/jwt/index.cjs +1 -1
- package/dist/plugins/jwt/index.d.cts +1 -1
- package/dist/plugins/jwt/index.d.mts +1 -1
- package/dist/plugins/jwt/index.d.ts +1 -1
- package/dist/plugins/jwt/index.mjs +1 -1
- package/dist/plugins/multi-session/index.d.cts +1 -1
- package/dist/plugins/multi-session/index.d.mts +1 -1
- package/dist/plugins/multi-session/index.d.ts +1 -1
- package/dist/plugins/oauth-proxy/index.cjs +1 -1
- package/dist/plugins/oauth-proxy/index.d.cts +1 -1
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.d.ts +1 -1
- package/dist/plugins/oauth-proxy/index.mjs +1 -1
- package/dist/plugins/open-api/index.cjs +1 -1
- package/dist/plugins/open-api/index.d.cts +1 -1
- package/dist/plugins/open-api/index.d.mts +1 -1
- package/dist/plugins/open-api/index.d.ts +1 -1
- package/dist/plugins/open-api/index.mjs +1 -1
- package/dist/plugins/organization/index.cjs +1 -1
- package/dist/plugins/organization/index.d.cts +8709 -7
- package/dist/plugins/organization/index.d.mts +8709 -7
- package/dist/plugins/organization/index.d.ts +8709 -7
- package/dist/plugins/organization/index.mjs +1 -1
- package/dist/plugins/passkey/index.d.cts +1 -1
- package/dist/plugins/passkey/index.d.mts +1 -1
- package/dist/plugins/passkey/index.d.ts +1 -1
- package/dist/plugins/phone-number/index.d.cts +1 -1
- package/dist/plugins/phone-number/index.d.mts +1 -1
- package/dist/plugins/phone-number/index.d.ts +1 -1
- package/dist/plugins/sso/index.d.cts +1 -1
- package/dist/plugins/sso/index.d.mts +1 -1
- package/dist/plugins/sso/index.d.ts +1 -1
- package/dist/plugins/two-factor/index.d.cts +1 -1
- package/dist/plugins/two-factor/index.d.mts +1 -1
- package/dist/plugins/two-factor/index.d.ts +1 -1
- package/dist/plugins/username/index.d.cts +1 -1
- package/dist/plugins/username/index.d.mts +1 -1
- package/dist/plugins/username/index.d.ts +1 -1
- package/dist/shared/{better-auth.BAHeu7c0.d.cts → better-auth.3YmU0S1F.d.mts} +1 -1
- package/dist/shared/{better-auth.BChhyjyz.d.mts → better-auth.B63JbN8N.d.mts} +1 -1
- package/dist/shared/{better-auth.CJnNI_pZ.cjs → better-auth.BMszDvE7.cjs} +19 -15
- package/dist/shared/{better-auth.z5hCXEpq.d.ts → better-auth.BUgzWHv2.d.ts} +1 -0
- package/dist/shared/{better-auth.DOiM3a81.d.ts → better-auth.CnLcZivL.d.ts} +1 -1
- package/dist/shared/{better-auth.CIlYLU40.d.mts → better-auth.DAOwKIB1.d.cts} +1 -1
- package/dist/shared/{better-auth.mScwiXcw.d.cts → better-auth.Dxic9U80.d.cts} +1 -1
- package/dist/shared/{better-auth.Ce5ruaNV.d.cts → better-auth.EzTTQ-DT.d.cts} +1 -0
- package/dist/shared/{better-auth.Gg7Z0WyK.d.mts → better-auth.UmNSYtaE.d.mts} +1 -0
- package/dist/shared/{better-auth.C1nJLdAt.mjs → better-auth.r3dumB_s.mjs} +19 -15
- package/dist/shared/{better-auth.CgpkeCuV.d.ts → better-auth.zDOXHJ7C.d.ts} +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/shared/better-auth.CDKE1pWJ.d.cts +0 -8697
- package/dist/shared/better-auth.CacwWJqS.d.ts +0 -8697
- package/dist/shared/better-auth.NTBHOnXV.d.mts +0 -8697
|
@@ -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.
|
|
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.
|
|
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.
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import { Db } from 'mongodb';
|
|
2
|
-
import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.
|
|
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.
|
|
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.
|
|
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';
|
package/dist/adapters/test.d.cts
CHANGED
package/dist/adapters/test.d.mts
CHANGED
package/dist/adapters/test.d.ts
CHANGED
package/dist/api/index.d.cts
CHANGED
|
@@ -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.
|
|
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';
|
package/dist/api/index.d.mts
CHANGED
|
@@ -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.
|
|
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';
|
package/dist/api/index.d.ts
CHANGED
|
@@ -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.
|
|
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';
|
package/dist/client/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.
|
|
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';
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.
|
|
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';
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.
|
|
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 {
|
|
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.
|
|
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.
|
|
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 {
|
|
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.
|
|
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.
|
|
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 {
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
8
|
-
|
|
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.
|
|
8
|
-
|
|
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.
|
|
8
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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';
|
package/dist/cookies/index.cjs
CHANGED
|
@@ -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 =
|
|
370
|
+
cookiePrefix = "better-auth.",
|
|
371
|
+
useSecureCookies = env.isProduction || url$1?.startsWith("https://") ? true : false
|
|
362
372
|
} = config || {};
|
|
363
|
-
const name = useSecureCookies ? `__Secure-${cookiePrefix}
|
|
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) {
|
package/dist/cookies/index.d.cts
CHANGED
|
@@ -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.
|
|
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';
|
package/dist/cookies/index.d.mts
CHANGED
|
@@ -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.
|
|
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';
|
package/dist/cookies/index.d.ts
CHANGED
|
@@ -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.
|
|
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';
|
package/dist/cookies/index.mjs
CHANGED
|
@@ -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 =
|
|
368
|
+
cookiePrefix = "better-auth.",
|
|
369
|
+
useSecureCookies = isProduction || url?.startsWith("https://") ? true : false
|
|
360
370
|
} = config || {};
|
|
361
|
-
const name = useSecureCookies ? `__Secure-${cookiePrefix}
|
|
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) {
|
package/dist/db/index.d.cts
CHANGED
|
@@ -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.
|
|
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.
|
|
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';
|