better-auth 1.2.5-beta.2 → 1.2.5-beta.4
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.cjs +2 -2
- 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/api/index.mjs +3 -3
- package/dist/client/index.d.cts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/plugins/index.cjs +6 -0
- package/dist/client/plugins/index.d.cts +5 -2
- package/dist/client/plugins/index.d.mts +5 -2
- package/dist/client/plugins/index.d.ts +5 -2
- package/dist/client/plugins/index.mjs +6 -0
- package/dist/client/react/index.d.cts +1 -1
- package/dist/client/react/index.d.mts +1 -1
- package/dist/client/react/index.d.ts +1 -1
- package/dist/client/solid/index.d.cts +1 -1
- package/dist/client/solid/index.d.mts +1 -1
- package/dist/client/solid/index.d.ts +1 -1
- package/dist/client/svelte/index.d.cts +1 -1
- package/dist/client/svelte/index.d.mts +1 -1
- package/dist/client/svelte/index.d.ts +1 -1
- package/dist/client/vue/index.d.cts +1 -1
- package/dist/client/vue/index.d.mts +1 -1
- package/dist/client/vue/index.d.ts +1 -1
- package/dist/cookies/index.cjs +6 -9
- 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 +6 -9
- package/dist/db/index.cjs +2 -2
- 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/db/index.mjs +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +4 -4
- package/dist/integrations/next-js.cjs +3 -3
- 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 +3 -3
- 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 +4 -3
- package/dist/plugins/admin/index.d.mts +4 -3
- package/dist/plugins/admin/index.d.ts +4 -3
- package/dist/plugins/admin/index.mjs +2 -2
- package/dist/plugins/anonymous/index.cjs +1 -1
- 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/anonymous/index.mjs +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.cjs +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/email-otp/index.mjs +1 -1
- package/dist/plugins/generic-oauth/index.cjs +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/generic-oauth/index.mjs +1 -1
- package/dist/plugins/index.cjs +5 -5
- package/dist/plugins/index.d.cts +2 -2
- package/dist/plugins/index.d.mts +2 -2
- package/dist/plugins/index.d.ts +2 -2
- package/dist/plugins/index.mjs +6 -6
- 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/magic-link/index.cjs +1 -1
- package/dist/plugins/magic-link/index.mjs +1 -1
- package/dist/plugins/multi-session/index.cjs +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/multi-session/index.mjs +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/oidc-provider/index.cjs +1 -1
- package/dist/plugins/oidc-provider/index.mjs +1 -1
- package/dist/plugins/one-tap/index.cjs +1 -1
- package/dist/plugins/one-tap/index.mjs +1 -1
- package/dist/plugins/open-api/index.cjs +2 -2
- 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 +2 -2
- package/dist/plugins/organization/index.cjs +2 -2
- package/dist/plugins/organization/index.d.cts +1 -1
- package/dist/plugins/organization/index.d.mts +1 -1
- package/dist/plugins/organization/index.d.ts +1 -1
- package/dist/plugins/organization/index.mjs +2 -2
- package/dist/plugins/passkey/index.cjs +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/passkey/index.mjs +1 -1
- package/dist/plugins/phone-number/index.cjs +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/phone-number/index.mjs +1 -1
- package/dist/plugins/sso/index.cjs +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/sso/index.mjs +1 -1
- package/dist/plugins/two-factor/index.cjs +2 -2
- 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/two-factor/index.mjs +2 -2
- package/dist/plugins/username/index.cjs +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/plugins/username/index.mjs +1 -1
- package/dist/shared/{better-auth.BH-DEtIS.mjs → better-auth.BJVJYVcJ.mjs} +1 -1
- package/dist/shared/{better-auth.DcpLarbN.cjs → better-auth.BddF2Yaz.cjs} +2 -2
- package/dist/shared/{better-auth.BMszDvE7.cjs → better-auth.BdiSabiO.cjs} +5 -4
- package/dist/shared/{better-auth.zDOXHJ7C.d.ts → better-auth.BgAsaHGJ.d.mts} +2 -2
- package/dist/shared/{better-auth.UmNSYtaE.d.mts → better-auth.BgoXd7dr.d.mts} +6 -1
- package/dist/shared/{better-auth.D4TPQEUm.cjs → better-auth.BiRM8Fdy.cjs} +1 -1
- package/dist/shared/{better-auth.Bwt75GhP.cjs → better-auth.C00ERbVB.cjs} +4 -0
- package/dist/shared/{better-auth.3YmU0S1F.d.mts → better-auth.C678re3w.d.mts} +1 -1
- package/dist/shared/{better-auth.C3yF81jt.mjs → better-auth.C6ZiueUc.mjs} +1 -1
- package/dist/shared/{better-auth.r3dumB_s.mjs → better-auth.CJ1_dCz5.mjs} +5 -4
- package/dist/shared/{better-auth.DAOwKIB1.d.cts → better-auth.CPv7iscr.d.cts} +1 -1
- package/dist/shared/{better-auth.67eSHmUo.mjs → better-auth.CUEbBDI6.mjs} +2 -2
- package/dist/shared/{better-auth.D_z8y7iw.mjs → better-auth.CrWUABzd.mjs} +4 -0
- package/dist/shared/{better-auth.EzTTQ-DT.d.cts → better-auth.D26n-znb.d.cts} +6 -1
- package/dist/shared/{better-auth.CnLcZivL.d.ts → better-auth.DWb95UJA.d.ts} +1 -1
- package/dist/shared/{better-auth.Duk7IG0N.mjs → better-auth.DZGc_87_.mjs} +1 -1
- package/dist/shared/{better-auth.CH2vR08q.cjs → better-auth.DpK5DyQT.cjs} +1 -1
- package/dist/shared/{better-auth.Dxic9U80.d.cts → better-auth.Dz0hfDVL.d.cts} +1 -1
- package/dist/shared/{better-auth.BgkOX1Ei.cjs → better-auth.i9-25Ul9.cjs} +1 -1
- package/dist/shared/{better-auth.BUgzWHv2.d.ts → better-auth.kkBzxQJx.d.ts} +6 -1
- package/dist/shared/{better-auth.B63JbN8N.d.mts → better-auth.xcEiilVu.d.ts} +2 -2
- 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
|
@@ -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.D26n-znb.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.BgoXd7dr.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.kkBzxQJx.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.D26n-znb.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.BgoXd7dr.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.kkBzxQJx.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.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const betterCall = require('better-call');
|
|
4
|
-
const account = require('../shared/better-auth.
|
|
4
|
+
const account = require('../shared/better-auth.C00ERbVB.cjs');
|
|
5
5
|
const zod = require('zod');
|
|
6
6
|
const cookies_index = require('../cookies/index.cjs');
|
|
7
7
|
const schema = require('../shared/better-auth.CHyZMcYK.cjs');
|
|
8
8
|
const env = require('../shared/better-auth.DiSjtgs9.cjs');
|
|
9
9
|
const logger = require('../shared/better-auth.GpOOav9x.cjs');
|
|
10
|
-
const getRequestIp = require('../shared/better-auth.
|
|
10
|
+
const getRequestIp = require('../shared/better-auth.i9-25Ul9.cjs');
|
|
11
11
|
const defu = require('defu');
|
|
12
12
|
require('../social-providers/index.cjs');
|
|
13
13
|
require('@better-fetch/fetch');
|
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.D26n-znb.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.BgoXd7dr.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.kkBzxQJx.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'kysely';
|
|
6
6
|
import '../shared/better-auth.2gyOPXIw.js';
|
package/dist/api/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { APIError, toResponse, createRouter } from 'better-call';
|
|
2
2
|
export { APIError } from 'better-call';
|
|
3
|
-
import { a as createAuthEndpoint, B as BASE_ERROR_CODES, d as createEmailVerificationToken, w as wildcardMatch, l as listSessions, u as updateUser, e as getSession, i as originCheckMiddleware, j as error, k as ok, m as unlinkAccount, n as deleteUserCallback, p as listUserAccounts, q as linkSocialAccount, r as revokeOtherSessions, t as revokeSessions, v as revokeSession, x as forgetPasswordCallback, y as deleteUser, z as setPassword, A as changePassword, C as changeEmail, D as sendVerificationEmail, E as verifyEmail, F as resetPassword, G as forgetPassword, I as signInEmail, J as signOut, K as callbackOAuth, L as signInSocial } from '../shared/better-auth.
|
|
4
|
-
export { c as createAuthMiddleware, f as freshSessionMiddleware, g as getSessionFromCtx, N as optionsMiddleware, o as originCheck, M as requestOnlySessionMiddleware, b as sendVerificationEmailFn, s as sessionMiddleware } from '../shared/better-auth.
|
|
3
|
+
import { a as createAuthEndpoint, B as BASE_ERROR_CODES, d as createEmailVerificationToken, w as wildcardMatch, l as listSessions, u as updateUser, e as getSession, i as originCheckMiddleware, j as error, k as ok, m as unlinkAccount, n as deleteUserCallback, p as listUserAccounts, q as linkSocialAccount, r as revokeOtherSessions, t as revokeSessions, v as revokeSession, x as forgetPasswordCallback, y as deleteUser, z as setPassword, A as changePassword, C as changeEmail, D as sendVerificationEmail, E as verifyEmail, F as resetPassword, G as forgetPassword, I as signInEmail, J as signOut, K as callbackOAuth, L as signInSocial } from '../shared/better-auth.CrWUABzd.mjs';
|
|
4
|
+
export { c as createAuthMiddleware, f as freshSessionMiddleware, g as getSessionFromCtx, N as optionsMiddleware, o as originCheck, M as requestOnlySessionMiddleware, b as sendVerificationEmailFn, s as sessionMiddleware } from '../shared/better-auth.CrWUABzd.mjs';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { setSessionCookie } from '../cookies/index.mjs';
|
|
7
7
|
import { f as parseUserInput } from '../shared/better-auth.C24Bzw4w.mjs';
|
|
8
8
|
import { b as isDevelopment } from '../shared/better-auth.8zoxzg-F.mjs';
|
|
9
9
|
import { a as logger } from '../shared/better-auth.DH3YjMQH.mjs';
|
|
10
|
-
import { g as getIp } from '../shared/better-auth.
|
|
10
|
+
import { g as getIp } from '../shared/better-auth.DZGc_87_.mjs';
|
|
11
11
|
import defu from 'defu';
|
|
12
12
|
import '../social-providers/index.mjs';
|
|
13
13
|
import '@better-fetch/fetch';
|
package/dist/client/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.
|
|
1
|
+
import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.D26n-znb.cjs';
|
|
2
2
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
3
3
|
import { BetterFetchError, BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
|
|
4
4
|
export * from '@better-fetch/fetch';
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.
|
|
1
|
+
import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.BgoXd7dr.mjs';
|
|
2
2
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
3
3
|
import { BetterFetchError, BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
|
|
4
4
|
export * from '@better-fetch/fetch';
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.
|
|
1
|
+
import { h as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.kkBzxQJx.js';
|
|
2
2
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
3
3
|
import { BetterFetchError, BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
|
|
4
4
|
export * from '@better-fetch/fetch';
|
|
@@ -98,6 +98,12 @@ const organizationClient = (options) => {
|
|
|
98
98
|
},
|
|
99
99
|
signal: "$activeOrgSignal"
|
|
100
100
|
},
|
|
101
|
+
{
|
|
102
|
+
matcher(path) {
|
|
103
|
+
return path.startsWith("/organization/set-active");
|
|
104
|
+
},
|
|
105
|
+
signal: "$sessionSignal"
|
|
106
|
+
},
|
|
101
107
|
{
|
|
102
108
|
matcher(path) {
|
|
103
109
|
return path.includes("/organization/update-member-role");
|
|
@@ -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.D26n-znb.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.Dz0hfDVL.cjs';
|
|
24
24
|
export * from '@simplewebauthn/server';
|
|
25
25
|
import 'zod';
|
|
26
26
|
import 'better-call';
|
|
@@ -168,6 +168,9 @@ declare const organizationClient: <O extends OrganizationClientOptions>(options?
|
|
|
168
168
|
} | {
|
|
169
169
|
matcher(path: string): boolean;
|
|
170
170
|
signal: "$activeOrgSignal";
|
|
171
|
+
} | {
|
|
172
|
+
matcher(path: string): boolean;
|
|
173
|
+
signal: "$sessionSignal";
|
|
171
174
|
} | {
|
|
172
175
|
matcher(path: string): boolean;
|
|
173
176
|
signal: "$activeMemberSignal";
|
|
@@ -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.BgoXd7dr.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.BgAsaHGJ.mjs';
|
|
24
24
|
export * from '@simplewebauthn/server';
|
|
25
25
|
import 'zod';
|
|
26
26
|
import 'better-call';
|
|
@@ -168,6 +168,9 @@ declare const organizationClient: <O extends OrganizationClientOptions>(options?
|
|
|
168
168
|
} | {
|
|
169
169
|
matcher(path: string): boolean;
|
|
170
170
|
signal: "$activeOrgSignal";
|
|
171
|
+
} | {
|
|
172
|
+
matcher(path: string): boolean;
|
|
173
|
+
signal: "$sessionSignal";
|
|
171
174
|
} | {
|
|
172
175
|
matcher(path: string): boolean;
|
|
173
176
|
signal: "$activeMemberSignal";
|
|
@@ -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.kkBzxQJx.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.xcEiilVu.js';
|
|
24
24
|
export * from '@simplewebauthn/server';
|
|
25
25
|
import 'zod';
|
|
26
26
|
import 'better-call';
|
|
@@ -168,6 +168,9 @@ declare const organizationClient: <O extends OrganizationClientOptions>(options?
|
|
|
168
168
|
} | {
|
|
169
169
|
matcher(path: string): boolean;
|
|
170
170
|
signal: "$activeOrgSignal";
|
|
171
|
+
} | {
|
|
172
|
+
matcher(path: string): boolean;
|
|
173
|
+
signal: "$sessionSignal";
|
|
171
174
|
} | {
|
|
172
175
|
matcher(path: string): boolean;
|
|
173
176
|
signal: "$activeMemberSignal";
|
|
@@ -96,6 +96,12 @@ const organizationClient = (options) => {
|
|
|
96
96
|
},
|
|
97
97
|
signal: "$activeOrgSignal"
|
|
98
98
|
},
|
|
99
|
+
{
|
|
100
|
+
matcher(path) {
|
|
101
|
+
return path.startsWith("/organization/set-active");
|
|
102
|
+
},
|
|
103
|
+
signal: "$sessionSignal"
|
|
104
|
+
},
|
|
99
105
|
{
|
|
100
106
|
matcher(path) {
|
|
101
107
|
return path.includes("/organization/update-member-role");
|
|
@@ -7,7 +7,7 @@ export * from '@better-fetch/fetch';
|
|
|
7
7
|
import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.cjs';
|
|
8
8
|
import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.cjs';
|
|
9
9
|
import { DependencyList } from 'react';
|
|
10
|
-
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
10
|
+
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.D26n-znb.cjs';
|
|
11
11
|
import 'better-call';
|
|
12
12
|
import 'zod';
|
|
13
13
|
import 'kysely';
|
|
@@ -7,7 +7,7 @@ export * from '@better-fetch/fetch';
|
|
|
7
7
|
import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.mjs';
|
|
8
8
|
import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.mjs';
|
|
9
9
|
import { DependencyList } from 'react';
|
|
10
|
-
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
10
|
+
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.BgoXd7dr.mjs';
|
|
11
11
|
import 'better-call';
|
|
12
12
|
import 'zod';
|
|
13
13
|
import 'kysely';
|
|
@@ -7,7 +7,7 @@ export * from '@better-fetch/fetch';
|
|
|
7
7
|
import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.js';
|
|
8
8
|
import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.js';
|
|
9
9
|
import { DependencyList } from 'react';
|
|
10
|
-
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
10
|
+
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.kkBzxQJx.js';
|
|
11
11
|
import 'better-call';
|
|
12
12
|
import 'zod';
|
|
13
13
|
import 'kysely';
|
|
@@ -4,7 +4,7 @@ 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.
|
|
7
|
+
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.D26n-znb.cjs';
|
|
8
8
|
export * from 'nanostores';
|
|
9
9
|
import 'better-call';
|
|
10
10
|
import 'zod';
|
|
@@ -4,7 +4,7 @@ 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.
|
|
7
|
+
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.BgoXd7dr.mjs';
|
|
8
8
|
export * from 'nanostores';
|
|
9
9
|
import 'better-call';
|
|
10
10
|
import 'zod';
|
|
@@ -4,7 +4,7 @@ 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.
|
|
7
|
+
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.kkBzxQJx.js';
|
|
8
8
|
export * from 'nanostores';
|
|
9
9
|
import 'better-call';
|
|
10
10
|
import 'zod';
|
|
@@ -6,7 +6,7 @@ import { BetterFetchError } from '@better-fetch/fetch';
|
|
|
6
6
|
export * from '@better-fetch/fetch';
|
|
7
7
|
import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.cjs';
|
|
8
8
|
import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.cjs';
|
|
9
|
-
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
9
|
+
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.D26n-znb.cjs';
|
|
10
10
|
import 'better-call';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'kysely';
|
|
@@ -6,7 +6,7 @@ import { BetterFetchError } from '@better-fetch/fetch';
|
|
|
6
6
|
export * from '@better-fetch/fetch';
|
|
7
7
|
import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.mjs';
|
|
8
8
|
import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.mjs';
|
|
9
|
-
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
9
|
+
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.BgoXd7dr.mjs';
|
|
10
10
|
import 'better-call';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'kysely';
|
|
@@ -6,7 +6,7 @@ import { BetterFetchError } from '@better-fetch/fetch';
|
|
|
6
6
|
export * from '@better-fetch/fetch';
|
|
7
7
|
import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.js';
|
|
8
8
|
import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.js';
|
|
9
|
-
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
9
|
+
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.kkBzxQJx.js';
|
|
10
10
|
import 'better-call';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'kysely';
|
|
@@ -6,7 +6,7 @@ export * from '@better-fetch/fetch';
|
|
|
6
6
|
import { DeepReadonly, Ref } from 'vue';
|
|
7
7
|
import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.cjs';
|
|
8
8
|
import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.cjs';
|
|
9
|
-
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
9
|
+
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.D26n-znb.cjs';
|
|
10
10
|
import 'better-call';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'kysely';
|
|
@@ -6,7 +6,7 @@ export * from '@better-fetch/fetch';
|
|
|
6
6
|
import { DeepReadonly, Ref } from 'vue';
|
|
7
7
|
import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.mjs';
|
|
8
8
|
import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.mjs';
|
|
9
|
-
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
9
|
+
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.BgoXd7dr.mjs';
|
|
10
10
|
import 'better-call';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'kysely';
|
|
@@ -6,7 +6,7 @@ export * from '@better-fetch/fetch';
|
|
|
6
6
|
import { DeepReadonly, Ref } from 'vue';
|
|
7
7
|
import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.js';
|
|
8
8
|
import { U as UnionToIntersection, P as PrettifyDeep } from '../../shared/better-auth.Bi8FQwDD.js';
|
|
9
|
-
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
9
|
+
import { h as BASE_ERROR_CODES } from '../../shared/better-auth.kkBzxQJx.js';
|
|
10
10
|
import 'better-call';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'kysely';
|
package/dist/cookies/index.cjs
CHANGED
|
@@ -358,21 +358,18 @@ const getSessionCookie = (request, config) => {
|
|
|
358
358
|
config.cookiePrefix = `${config.cookiePrefix}.`;
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
const headers =
|
|
361
|
+
const headers = "headers" in request ? request.headers : request;
|
|
362
362
|
const req = request instanceof Request ? request : void 0;
|
|
363
|
-
|
|
363
|
+
url.getBaseURL(req?.url, config?.path, req);
|
|
364
364
|
const cookies = headers.get("cookie");
|
|
365
365
|
if (!cookies) {
|
|
366
366
|
return null;
|
|
367
367
|
}
|
|
368
|
-
const {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
useSecureCookies = env.isProduction || url$1?.startsWith("https://") ? true : false
|
|
372
|
-
} = config || {};
|
|
373
|
-
const name = useSecureCookies ? `__Secure-${cookiePrefix}${cookieName}` : `${cookiePrefix}${cookieName}`;
|
|
368
|
+
const { cookieName = "session_token", cookiePrefix = "better-auth." } = config || {};
|
|
369
|
+
const name = `${cookiePrefix}${cookieName}`;
|
|
370
|
+
const secureCookieName = `__Secure-${name}`;
|
|
374
371
|
const parsedCookie = parseCookies(cookies);
|
|
375
|
-
const sessionToken = parsedCookie.get(name);
|
|
372
|
+
const sessionToken = parsedCookie.get(name) || parsedCookie.get(secureCookieName);
|
|
376
373
|
if (sessionToken) {
|
|
377
374
|
return sessionToken;
|
|
378
375
|
}
|
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.D26n-znb.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.BgoXd7dr.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.kkBzxQJx.js';
|
|
3
3
|
import '../shared/better-auth.Bi8FQwDD.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'kysely';
|
package/dist/cookies/index.mjs
CHANGED
|
@@ -356,21 +356,18 @@ const getSessionCookie = (request, config) => {
|
|
|
356
356
|
config.cookiePrefix = `${config.cookiePrefix}.`;
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
const headers =
|
|
359
|
+
const headers = "headers" in request ? request.headers : request;
|
|
360
360
|
const req = request instanceof Request ? request : void 0;
|
|
361
|
-
|
|
361
|
+
getBaseURL(req?.url, config?.path, req);
|
|
362
362
|
const cookies = headers.get("cookie");
|
|
363
363
|
if (!cookies) {
|
|
364
364
|
return null;
|
|
365
365
|
}
|
|
366
|
-
const {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
useSecureCookies = isProduction || url?.startsWith("https://") ? true : false
|
|
370
|
-
} = config || {};
|
|
371
|
-
const name = useSecureCookies ? `__Secure-${cookiePrefix}${cookieName}` : `${cookiePrefix}${cookieName}`;
|
|
366
|
+
const { cookieName = "session_token", cookiePrefix = "better-auth." } = config || {};
|
|
367
|
+
const name = `${cookiePrefix}${cookieName}`;
|
|
368
|
+
const secureCookieName = `__Secure-${name}`;
|
|
372
369
|
const parsedCookie = parseCookies(cookies);
|
|
373
|
-
const sessionToken = parsedCookie.get(name);
|
|
370
|
+
const sessionToken = parsedCookie.get(name) || parsedCookie.get(secureCookieName);
|
|
374
371
|
if (sessionToken) {
|
|
375
372
|
return sessionToken;
|
|
376
373
|
}
|
package/dist/db/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const getMigration = require('../shared/better-auth.
|
|
3
|
+
const getMigration = require('../shared/better-auth.BddF2Yaz.cjs');
|
|
4
4
|
const getTables = require('../shared/better-auth.BEphVDyL.cjs');
|
|
5
5
|
const zod = require('zod');
|
|
6
6
|
const schema = require('../shared/better-auth.CHyZMcYK.cjs');
|
|
7
7
|
require('../shared/better-auth.C1hdVENX.cjs');
|
|
8
|
-
require('../shared/better-auth.
|
|
8
|
+
require('../shared/better-auth.i9-25Ul9.cjs');
|
|
9
9
|
require('../shared/better-auth.DiSjtgs9.cjs');
|
|
10
10
|
require('../shared/better-auth.D3mtHEZg.cjs');
|
|
11
11
|
require('../shared/better-auth.Bg6iw3ig.cjs');
|
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.D26n-znb.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.D26n-znb.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import '../shared/better-auth.Bi8FQwDD.cjs';
|
|
5
5
|
import 'kysely';
|
package/dist/db/index.d.mts
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.BgoXd7dr.mjs';
|
|
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.BgoXd7dr.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import '../shared/better-auth.Bi8FQwDD.mjs';
|
|
5
5
|
import 'kysely';
|