better-auth 1.2.5-beta.7 → 1.2.5-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +8 -4
- 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 +9 -5
- 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.d.cts +2 -2
- package/dist/client/plugins/index.d.mts +2 -2
- package/dist/client/plugins/index.d.ts +2 -2
- 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.d.cts +1 -1
- package/dist/cookies/index.d.mts +1 -1
- package/dist/cookies/index.d.ts +1 -1
- 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.cjs +1 -1
- 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 +2 -2
- 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 +1 -1
- package/dist/plugins/admin/index.d.mts +1 -1
- package/dist/plugins/admin/index.d.ts +1 -1
- 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 +4 -4
- 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 +5 -5
- 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.d.cts +1 -1
- package/dist/plugins/oidc-provider/index.d.mts +1 -1
- package/dist/plugins/oidc-provider/index.d.ts +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 +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 +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.2fbYHU01.d.mts → better-auth.3uxCR-1i.d.ts} +2 -2
- package/dist/shared/{better-auth.vdKrG2Zp.mjs → better-auth.73eFuzj6.mjs} +7 -8
- package/dist/shared/{better-auth.UO_GAdaM.mjs → better-auth.BCV_xmAm.mjs} +2 -3
- package/dist/shared/{better-auth.1GtLBK1J.cjs → better-auth.BKKQIUTB.cjs} +2 -3
- package/dist/shared/{better-auth.CV08HOs_.d.ts → better-auth.Blj1xlkZ.d.mts} +2 -2
- package/dist/shared/{better-auth.CKCPM9Oy.mjs → better-auth.Bmxywnpb.mjs} +1 -1
- package/dist/shared/{better-auth.aci1hpij.cjs → better-auth.BpqrcwQV.cjs} +1 -1
- package/dist/shared/{better-auth.BjXInNL7.d.ts → better-auth.BrZtYPth.d.ts} +1 -1
- package/dist/shared/{better-auth.D_6ikAPh.d.mts → better-auth.Ci5pgoju.d.mts} +24 -24
- package/dist/shared/{better-auth.lijknCkI.mjs → better-auth.CroE2PB-.mjs} +1 -1
- package/dist/shared/{better-auth.B3unKFue.cjs → better-auth.D34f3UQF.cjs} +1 -1
- package/dist/shared/{better-auth.BODzPfJo.d.ts → better-auth.DPgLMy-i.d.ts} +24 -24
- package/dist/shared/{better-auth.C7O0617V.d.mts → better-auth.DXkSM8GQ.d.mts} +1 -1
- package/dist/shared/{better-auth.Al7ra9Pe.d.cts → better-auth.Ddyg4QNk.d.cts} +1 -1
- package/dist/shared/{better-auth.RZCibiKy.d.cts → better-auth.UATG5YO8.d.cts} +1 -1
- package/dist/shared/{better-auth.ChassmKE.cjs → better-auth.UNIWw9Sf.cjs} +7 -8
- package/dist/shared/{better-auth.BkL9ntGY.d.cts → better-auth.feQWZZzF.d.cts} +24 -24
- 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
|
@@ -2970,8 +2970,7 @@ const unlinkAccount = createAuthEndpoint(
|
|
|
2970
2970
|
method: "POST",
|
|
2971
2971
|
body: z.object({
|
|
2972
2972
|
providerId: z.string(),
|
|
2973
|
-
accountId: z.string()
|
|
2974
|
-
// Add account ID to identify which account to unlink
|
|
2973
|
+
accountId: z.string().optional()
|
|
2975
2974
|
}),
|
|
2976
2975
|
use: [freshSessionMiddleware]
|
|
2977
2976
|
},
|
|
@@ -2980,19 +2979,19 @@ const unlinkAccount = createAuthEndpoint(
|
|
|
2980
2979
|
const accounts = await ctx.context.internalAdapter.findAccounts(
|
|
2981
2980
|
ctx.context.session.user.id
|
|
2982
2981
|
);
|
|
2982
|
+
if (accounts.length === 1 && !ctx.context.options.account?.accountLinking?.allowUnlinkingAll) {
|
|
2983
|
+
throw new APIError("BAD_REQUEST", {
|
|
2984
|
+
message: BASE_ERROR_CODES.FAILED_TO_UNLINK_LAST_ACCOUNT
|
|
2985
|
+
});
|
|
2986
|
+
}
|
|
2983
2987
|
const accountExist = accounts.find(
|
|
2984
|
-
(account) => account.providerId === providerId
|
|
2988
|
+
(account) => accountId ? account.accountId === accountId && account.providerId === providerId : account.providerId === providerId
|
|
2985
2989
|
);
|
|
2986
2990
|
if (!accountExist) {
|
|
2987
2991
|
throw new APIError("BAD_REQUEST", {
|
|
2988
2992
|
message: BASE_ERROR_CODES.ACCOUNT_NOT_FOUND
|
|
2989
2993
|
});
|
|
2990
2994
|
}
|
|
2991
|
-
if (accounts.length === 1 && !ctx.context.options.account?.accountLinking?.allowUnlinkingAll) {
|
|
2992
|
-
throw new APIError("BAD_REQUEST", {
|
|
2993
|
-
message: BASE_ERROR_CODES.FAILED_TO_UNLINK_LAST_ACCOUNT
|
|
2994
|
-
});
|
|
2995
|
-
}
|
|
2996
2995
|
await ctx.context.internalAdapter.deleteAccount(accountExist.id);
|
|
2997
2996
|
return ctx.json({
|
|
2998
2997
|
status: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIError } from 'better-call';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { c as createAuthMiddleware, s as sessionMiddleware, a as createAuthEndpoint, g as getSessionFromCtx, B as BASE_ERROR_CODES, M as requestOnlySessionMiddleware } from './better-auth.
|
|
3
|
+
import { c as createAuthMiddleware, s as sessionMiddleware, a as createAuthEndpoint, g as getSessionFromCtx, B as BASE_ERROR_CODES, M as requestOnlySessionMiddleware } from './better-auth.73eFuzj6.mjs';
|
|
4
4
|
import './better-auth.8zoxzg-F.mjs';
|
|
5
5
|
import '@better-auth/utils/base64';
|
|
6
6
|
import '@better-auth/utils/hmac';
|
|
@@ -377,8 +377,7 @@ const getOrgAdapter = (context, options) => {
|
|
|
377
377
|
field: "userId",
|
|
378
378
|
value: userId
|
|
379
379
|
}
|
|
380
|
-
]
|
|
381
|
-
limit: options?.membershipLimit || 100
|
|
380
|
+
]
|
|
382
381
|
});
|
|
383
382
|
if (!members || members.length === 0) {
|
|
384
383
|
return [];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const betterCall = require('better-call');
|
|
4
4
|
const zod = require('zod');
|
|
5
|
-
const account = require('./better-auth.
|
|
5
|
+
const account = require('./better-auth.UNIWw9Sf.cjs');
|
|
6
6
|
require('./better-auth.DiSjtgs9.cjs');
|
|
7
7
|
require('@better-auth/utils/base64');
|
|
8
8
|
require('@better-auth/utils/hmac');
|
|
@@ -379,8 +379,7 @@ const getOrgAdapter = (context, options) => {
|
|
|
379
379
|
field: "userId",
|
|
380
380
|
value: userId
|
|
381
381
|
}
|
|
382
|
-
]
|
|
383
|
-
limit: options?.membershipLimit || 100
|
|
382
|
+
]
|
|
384
383
|
});
|
|
385
384
|
if (!members || members.length === 0) {
|
|
386
385
|
return [];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as zod from 'zod';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
|
-
import { G as GenericEndpointContext, I as InferOptionSchema, H as HookEndpointContext, l as AuthContext } from './better-auth.
|
|
4
|
-
import { Statements } from '../plugins/access/index.
|
|
3
|
+
import { G as GenericEndpointContext, I as InferOptionSchema, H as HookEndpointContext, l as AuthContext } from './better-auth.Ci5pgoju.mjs';
|
|
4
|
+
import { Statements } from '../plugins/access/index.mjs';
|
|
5
5
|
|
|
6
6
|
declare const apiKeySchema: ({ timeWindow, rateLimitMax, }: {
|
|
7
7
|
timeWindow: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIError } from 'better-call';
|
|
2
|
-
import { c as createAuthMiddleware, g as getSessionFromCtx } from './better-auth.
|
|
2
|
+
import { c as createAuthMiddleware, g as getSessionFromCtx } from './better-auth.73eFuzj6.mjs';
|
|
3
3
|
import { setSessionCookie } from '../cookies/index.mjs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import './better-auth.CepcSj5H.mjs';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
|
-
const account = require('./better-auth.
|
|
5
|
+
const account = require('./better-auth.UNIWw9Sf.cjs');
|
|
6
6
|
const cookies_index = require('../cookies/index.cjs');
|
|
7
7
|
const schema$1 = require('./better-auth.C5H9XEzZ.cjs');
|
|
8
8
|
require('./better-auth.DiSjtgs9.cjs');
|
|
@@ -5645,13 +5645,13 @@ declare const unlinkAccount: {
|
|
|
5645
5645
|
method: "POST";
|
|
5646
5646
|
body: z.ZodObject<{
|
|
5647
5647
|
providerId: z.ZodString;
|
|
5648
|
-
accountId: z.ZodString
|
|
5648
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
5649
5649
|
}, "strip", z.ZodTypeAny, {
|
|
5650
5650
|
providerId: string;
|
|
5651
|
-
accountId
|
|
5651
|
+
accountId?: string | undefined;
|
|
5652
5652
|
}, {
|
|
5653
5653
|
providerId: string;
|
|
5654
|
-
accountId
|
|
5654
|
+
accountId?: string | undefined;
|
|
5655
5655
|
}>;
|
|
5656
5656
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
5657
5657
|
session: {
|
|
@@ -5694,13 +5694,13 @@ declare const unlinkAccount: {
|
|
|
5694
5694
|
method: "POST";
|
|
5695
5695
|
body: z.ZodObject<{
|
|
5696
5696
|
providerId: z.ZodString;
|
|
5697
|
-
accountId: z.ZodString
|
|
5697
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
5698
5698
|
}, "strip", z.ZodTypeAny, {
|
|
5699
5699
|
providerId: string;
|
|
5700
|
-
accountId
|
|
5700
|
+
accountId?: string | undefined;
|
|
5701
5701
|
}, {
|
|
5702
5702
|
providerId: string;
|
|
5703
|
-
accountId
|
|
5703
|
+
accountId?: string | undefined;
|
|
5704
5704
|
}>;
|
|
5705
5705
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
5706
5706
|
session: {
|
|
@@ -9167,13 +9167,13 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
|
|
|
9167
9167
|
method: "POST";
|
|
9168
9168
|
body: zod.ZodObject<{
|
|
9169
9169
|
providerId: zod.ZodString;
|
|
9170
|
-
accountId: zod.ZodString
|
|
9170
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
9171
9171
|
}, "strip", zod.ZodTypeAny, {
|
|
9172
9172
|
providerId: string;
|
|
9173
|
-
accountId
|
|
9173
|
+
accountId?: string | undefined;
|
|
9174
9174
|
}, {
|
|
9175
9175
|
providerId: string;
|
|
9176
|
-
accountId
|
|
9176
|
+
accountId?: string | undefined;
|
|
9177
9177
|
}>;
|
|
9178
9178
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
9179
9179
|
session: {
|
|
@@ -9216,13 +9216,13 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
|
|
|
9216
9216
|
method: "POST";
|
|
9217
9217
|
body: zod.ZodObject<{
|
|
9218
9218
|
providerId: zod.ZodString;
|
|
9219
|
-
accountId: zod.ZodString
|
|
9219
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
9220
9220
|
}, "strip", zod.ZodTypeAny, {
|
|
9221
9221
|
providerId: string;
|
|
9222
|
-
accountId
|
|
9222
|
+
accountId?: string | undefined;
|
|
9223
9223
|
}, {
|
|
9224
9224
|
providerId: string;
|
|
9225
|
-
accountId
|
|
9225
|
+
accountId?: string | undefined;
|
|
9226
9226
|
}>;
|
|
9227
9227
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
9228
9228
|
session: {
|
|
@@ -12690,13 +12690,13 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
|
|
|
12690
12690
|
method: "POST";
|
|
12691
12691
|
body: zod.ZodObject<{
|
|
12692
12692
|
providerId: zod.ZodString;
|
|
12693
|
-
accountId: zod.ZodString
|
|
12693
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
12694
12694
|
}, "strip", zod.ZodTypeAny, {
|
|
12695
12695
|
providerId: string;
|
|
12696
|
-
accountId
|
|
12696
|
+
accountId?: string | undefined;
|
|
12697
12697
|
}, {
|
|
12698
12698
|
providerId: string;
|
|
12699
|
-
accountId
|
|
12699
|
+
accountId?: string | undefined;
|
|
12700
12700
|
}>;
|
|
12701
12701
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
12702
12702
|
session: {
|
|
@@ -12739,13 +12739,13 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
|
|
|
12739
12739
|
method: "POST";
|
|
12740
12740
|
body: zod.ZodObject<{
|
|
12741
12741
|
providerId: zod.ZodString;
|
|
12742
|
-
accountId: zod.ZodString
|
|
12742
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
12743
12743
|
}, "strip", zod.ZodTypeAny, {
|
|
12744
12744
|
providerId: string;
|
|
12745
|
-
accountId
|
|
12745
|
+
accountId?: string | undefined;
|
|
12746
12746
|
}, {
|
|
12747
12747
|
providerId: string;
|
|
12748
|
-
accountId
|
|
12748
|
+
accountId?: string | undefined;
|
|
12749
12749
|
}>;
|
|
12750
12750
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
12751
12751
|
session: {
|
|
@@ -16237,13 +16237,13 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
|
|
|
16237
16237
|
method: "POST";
|
|
16238
16238
|
body: zod.ZodObject<{
|
|
16239
16239
|
providerId: zod.ZodString;
|
|
16240
|
-
accountId: zod.ZodString
|
|
16240
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
16241
16241
|
}, "strip", zod.ZodTypeAny, {
|
|
16242
16242
|
providerId: string;
|
|
16243
|
-
accountId
|
|
16243
|
+
accountId?: string | undefined;
|
|
16244
16244
|
}, {
|
|
16245
16245
|
providerId: string;
|
|
16246
|
-
accountId
|
|
16246
|
+
accountId?: string | undefined;
|
|
16247
16247
|
}>;
|
|
16248
16248
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
16249
16249
|
session: {
|
|
@@ -16286,13 +16286,13 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
|
|
|
16286
16286
|
method: "POST";
|
|
16287
16287
|
body: zod.ZodObject<{
|
|
16288
16288
|
providerId: zod.ZodString;
|
|
16289
|
-
accountId: zod.ZodString
|
|
16289
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
16290
16290
|
}, "strip", zod.ZodTypeAny, {
|
|
16291
16291
|
providerId: string;
|
|
16292
|
-
accountId
|
|
16292
|
+
accountId?: string | undefined;
|
|
16293
16293
|
}, {
|
|
16294
16294
|
providerId: string;
|
|
16295
|
-
accountId
|
|
16295
|
+
accountId?: string | undefined;
|
|
16296
16296
|
}>;
|
|
16297
16297
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
16298
16298
|
session: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
|
-
import { c as createAuthMiddleware, g as getSessionFromCtx, a as createAuthEndpoint } from './better-auth.
|
|
3
|
+
import { c as createAuthMiddleware, g as getSessionFromCtx, a as createAuthEndpoint } from './better-auth.73eFuzj6.mjs';
|
|
4
4
|
import { setSessionCookie, deleteSessionCookie } from '../cookies/index.mjs';
|
|
5
5
|
import { m as mergeSchema } from './better-auth.CepcSj5H.mjs';
|
|
6
6
|
import './better-auth.8zoxzg-F.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const betterCall = require('better-call');
|
|
4
|
-
const account = require('./better-auth.
|
|
4
|
+
const account = require('./better-auth.UNIWw9Sf.cjs');
|
|
5
5
|
const cookies_index = require('../cookies/index.cjs');
|
|
6
6
|
const zod = require('zod');
|
|
7
7
|
require('./better-auth.C5H9XEzZ.cjs');
|
|
@@ -5645,13 +5645,13 @@ declare const unlinkAccount: {
|
|
|
5645
5645
|
method: "POST";
|
|
5646
5646
|
body: z.ZodObject<{
|
|
5647
5647
|
providerId: z.ZodString;
|
|
5648
|
-
accountId: z.ZodString
|
|
5648
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
5649
5649
|
}, "strip", z.ZodTypeAny, {
|
|
5650
5650
|
providerId: string;
|
|
5651
|
-
accountId
|
|
5651
|
+
accountId?: string | undefined;
|
|
5652
5652
|
}, {
|
|
5653
5653
|
providerId: string;
|
|
5654
|
-
accountId
|
|
5654
|
+
accountId?: string | undefined;
|
|
5655
5655
|
}>;
|
|
5656
5656
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
5657
5657
|
session: {
|
|
@@ -5694,13 +5694,13 @@ declare const unlinkAccount: {
|
|
|
5694
5694
|
method: "POST";
|
|
5695
5695
|
body: z.ZodObject<{
|
|
5696
5696
|
providerId: z.ZodString;
|
|
5697
|
-
accountId: z.ZodString
|
|
5697
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
5698
5698
|
}, "strip", z.ZodTypeAny, {
|
|
5699
5699
|
providerId: string;
|
|
5700
|
-
accountId
|
|
5700
|
+
accountId?: string | undefined;
|
|
5701
5701
|
}, {
|
|
5702
5702
|
providerId: string;
|
|
5703
|
-
accountId
|
|
5703
|
+
accountId?: string | undefined;
|
|
5704
5704
|
}>;
|
|
5705
5705
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
5706
5706
|
session: {
|
|
@@ -9167,13 +9167,13 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
|
|
|
9167
9167
|
method: "POST";
|
|
9168
9168
|
body: zod.ZodObject<{
|
|
9169
9169
|
providerId: zod.ZodString;
|
|
9170
|
-
accountId: zod.ZodString
|
|
9170
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
9171
9171
|
}, "strip", zod.ZodTypeAny, {
|
|
9172
9172
|
providerId: string;
|
|
9173
|
-
accountId
|
|
9173
|
+
accountId?: string | undefined;
|
|
9174
9174
|
}, {
|
|
9175
9175
|
providerId: string;
|
|
9176
|
-
accountId
|
|
9176
|
+
accountId?: string | undefined;
|
|
9177
9177
|
}>;
|
|
9178
9178
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
9179
9179
|
session: {
|
|
@@ -9216,13 +9216,13 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
|
|
|
9216
9216
|
method: "POST";
|
|
9217
9217
|
body: zod.ZodObject<{
|
|
9218
9218
|
providerId: zod.ZodString;
|
|
9219
|
-
accountId: zod.ZodString
|
|
9219
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
9220
9220
|
}, "strip", zod.ZodTypeAny, {
|
|
9221
9221
|
providerId: string;
|
|
9222
|
-
accountId
|
|
9222
|
+
accountId?: string | undefined;
|
|
9223
9223
|
}, {
|
|
9224
9224
|
providerId: string;
|
|
9225
|
-
accountId
|
|
9225
|
+
accountId?: string | undefined;
|
|
9226
9226
|
}>;
|
|
9227
9227
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
9228
9228
|
session: {
|
|
@@ -12690,13 +12690,13 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
|
|
|
12690
12690
|
method: "POST";
|
|
12691
12691
|
body: zod.ZodObject<{
|
|
12692
12692
|
providerId: zod.ZodString;
|
|
12693
|
-
accountId: zod.ZodString
|
|
12693
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
12694
12694
|
}, "strip", zod.ZodTypeAny, {
|
|
12695
12695
|
providerId: string;
|
|
12696
|
-
accountId
|
|
12696
|
+
accountId?: string | undefined;
|
|
12697
12697
|
}, {
|
|
12698
12698
|
providerId: string;
|
|
12699
|
-
accountId
|
|
12699
|
+
accountId?: string | undefined;
|
|
12700
12700
|
}>;
|
|
12701
12701
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
12702
12702
|
session: {
|
|
@@ -12739,13 +12739,13 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
|
|
|
12739
12739
|
method: "POST";
|
|
12740
12740
|
body: zod.ZodObject<{
|
|
12741
12741
|
providerId: zod.ZodString;
|
|
12742
|
-
accountId: zod.ZodString
|
|
12742
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
12743
12743
|
}, "strip", zod.ZodTypeAny, {
|
|
12744
12744
|
providerId: string;
|
|
12745
|
-
accountId
|
|
12745
|
+
accountId?: string | undefined;
|
|
12746
12746
|
}, {
|
|
12747
12747
|
providerId: string;
|
|
12748
|
-
accountId
|
|
12748
|
+
accountId?: string | undefined;
|
|
12749
12749
|
}>;
|
|
12750
12750
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
12751
12751
|
session: {
|
|
@@ -16237,13 +16237,13 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
|
|
|
16237
16237
|
method: "POST";
|
|
16238
16238
|
body: zod.ZodObject<{
|
|
16239
16239
|
providerId: zod.ZodString;
|
|
16240
|
-
accountId: zod.ZodString
|
|
16240
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
16241
16241
|
}, "strip", zod.ZodTypeAny, {
|
|
16242
16242
|
providerId: string;
|
|
16243
|
-
accountId
|
|
16243
|
+
accountId?: string | undefined;
|
|
16244
16244
|
}, {
|
|
16245
16245
|
providerId: string;
|
|
16246
|
-
accountId
|
|
16246
|
+
accountId?: string | undefined;
|
|
16247
16247
|
}>;
|
|
16248
16248
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
16249
16249
|
session: {
|
|
@@ -16286,13 +16286,13 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
|
|
|
16286
16286
|
method: "POST";
|
|
16287
16287
|
body: zod.ZodObject<{
|
|
16288
16288
|
providerId: zod.ZodString;
|
|
16289
|
-
accountId: zod.ZodString
|
|
16289
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
16290
16290
|
}, "strip", zod.ZodTypeAny, {
|
|
16291
16291
|
providerId: string;
|
|
16292
|
-
accountId
|
|
16292
|
+
accountId?: string | undefined;
|
|
16293
16293
|
}, {
|
|
16294
16294
|
providerId: string;
|
|
16295
|
-
accountId
|
|
16295
|
+
accountId?: string | undefined;
|
|
16296
16296
|
}>;
|
|
16297
16297
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
16298
16298
|
session: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as zod from 'zod';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
|
-
import { G as GenericEndpointContext, I as InferOptionSchema, H as HookEndpointContext, l as AuthContext } from './better-auth.
|
|
3
|
+
import { G as GenericEndpointContext, I as InferOptionSchema, H as HookEndpointContext, l as AuthContext } from './better-auth.feQWZZzF.cjs';
|
|
4
4
|
import { Statements } from '../plugins/access/index.cjs';
|
|
5
5
|
|
|
6
6
|
declare const apiKeySchema: ({ timeWindow, rateLimitMax, }: {
|
|
@@ -2972,8 +2972,7 @@ const unlinkAccount = createAuthEndpoint(
|
|
|
2972
2972
|
method: "POST",
|
|
2973
2973
|
body: zod.z.object({
|
|
2974
2974
|
providerId: zod.z.string(),
|
|
2975
|
-
accountId: zod.z.string()
|
|
2976
|
-
// Add account ID to identify which account to unlink
|
|
2975
|
+
accountId: zod.z.string().optional()
|
|
2977
2976
|
}),
|
|
2978
2977
|
use: [freshSessionMiddleware]
|
|
2979
2978
|
},
|
|
@@ -2982,19 +2981,19 @@ const unlinkAccount = createAuthEndpoint(
|
|
|
2982
2981
|
const accounts = await ctx.context.internalAdapter.findAccounts(
|
|
2983
2982
|
ctx.context.session.user.id
|
|
2984
2983
|
);
|
|
2984
|
+
if (accounts.length === 1 && !ctx.context.options.account?.accountLinking?.allowUnlinkingAll) {
|
|
2985
|
+
throw new betterCall.APIError("BAD_REQUEST", {
|
|
2986
|
+
message: BASE_ERROR_CODES.FAILED_TO_UNLINK_LAST_ACCOUNT
|
|
2987
|
+
});
|
|
2988
|
+
}
|
|
2985
2989
|
const accountExist = accounts.find(
|
|
2986
|
-
(account) => account.providerId === providerId
|
|
2990
|
+
(account) => accountId ? account.accountId === accountId && account.providerId === providerId : account.providerId === providerId
|
|
2987
2991
|
);
|
|
2988
2992
|
if (!accountExist) {
|
|
2989
2993
|
throw new betterCall.APIError("BAD_REQUEST", {
|
|
2990
2994
|
message: BASE_ERROR_CODES.ACCOUNT_NOT_FOUND
|
|
2991
2995
|
});
|
|
2992
2996
|
}
|
|
2993
|
-
if (accounts.length === 1 && !ctx.context.options.account?.accountLinking?.allowUnlinkingAll) {
|
|
2994
|
-
throw new betterCall.APIError("BAD_REQUEST", {
|
|
2995
|
-
message: BASE_ERROR_CODES.FAILED_TO_UNLINK_LAST_ACCOUNT
|
|
2996
|
-
});
|
|
2997
|
-
}
|
|
2998
2997
|
await ctx.context.internalAdapter.deleteAccount(accountExist.id);
|
|
2999
2998
|
return ctx.json({
|
|
3000
2999
|
status: true
|
|
@@ -5645,13 +5645,13 @@ declare const unlinkAccount: {
|
|
|
5645
5645
|
method: "POST";
|
|
5646
5646
|
body: z.ZodObject<{
|
|
5647
5647
|
providerId: z.ZodString;
|
|
5648
|
-
accountId: z.ZodString
|
|
5648
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
5649
5649
|
}, "strip", z.ZodTypeAny, {
|
|
5650
5650
|
providerId: string;
|
|
5651
|
-
accountId
|
|
5651
|
+
accountId?: string | undefined;
|
|
5652
5652
|
}, {
|
|
5653
5653
|
providerId: string;
|
|
5654
|
-
accountId
|
|
5654
|
+
accountId?: string | undefined;
|
|
5655
5655
|
}>;
|
|
5656
5656
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
5657
5657
|
session: {
|
|
@@ -5694,13 +5694,13 @@ declare const unlinkAccount: {
|
|
|
5694
5694
|
method: "POST";
|
|
5695
5695
|
body: z.ZodObject<{
|
|
5696
5696
|
providerId: z.ZodString;
|
|
5697
|
-
accountId: z.ZodString
|
|
5697
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
5698
5698
|
}, "strip", z.ZodTypeAny, {
|
|
5699
5699
|
providerId: string;
|
|
5700
|
-
accountId
|
|
5700
|
+
accountId?: string | undefined;
|
|
5701
5701
|
}, {
|
|
5702
5702
|
providerId: string;
|
|
5703
|
-
accountId
|
|
5703
|
+
accountId?: string | undefined;
|
|
5704
5704
|
}>;
|
|
5705
5705
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
5706
5706
|
session: {
|
|
@@ -9167,13 +9167,13 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
|
|
|
9167
9167
|
method: "POST";
|
|
9168
9168
|
body: zod.ZodObject<{
|
|
9169
9169
|
providerId: zod.ZodString;
|
|
9170
|
-
accountId: zod.ZodString
|
|
9170
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
9171
9171
|
}, "strip", zod.ZodTypeAny, {
|
|
9172
9172
|
providerId: string;
|
|
9173
|
-
accountId
|
|
9173
|
+
accountId?: string | undefined;
|
|
9174
9174
|
}, {
|
|
9175
9175
|
providerId: string;
|
|
9176
|
-
accountId
|
|
9176
|
+
accountId?: string | undefined;
|
|
9177
9177
|
}>;
|
|
9178
9178
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
9179
9179
|
session: {
|
|
@@ -9216,13 +9216,13 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
|
|
|
9216
9216
|
method: "POST";
|
|
9217
9217
|
body: zod.ZodObject<{
|
|
9218
9218
|
providerId: zod.ZodString;
|
|
9219
|
-
accountId: zod.ZodString
|
|
9219
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
9220
9220
|
}, "strip", zod.ZodTypeAny, {
|
|
9221
9221
|
providerId: string;
|
|
9222
|
-
accountId
|
|
9222
|
+
accountId?: string | undefined;
|
|
9223
9223
|
}, {
|
|
9224
9224
|
providerId: string;
|
|
9225
|
-
accountId
|
|
9225
|
+
accountId?: string | undefined;
|
|
9226
9226
|
}>;
|
|
9227
9227
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
9228
9228
|
session: {
|
|
@@ -12690,13 +12690,13 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
|
|
|
12690
12690
|
method: "POST";
|
|
12691
12691
|
body: zod.ZodObject<{
|
|
12692
12692
|
providerId: zod.ZodString;
|
|
12693
|
-
accountId: zod.ZodString
|
|
12693
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
12694
12694
|
}, "strip", zod.ZodTypeAny, {
|
|
12695
12695
|
providerId: string;
|
|
12696
|
-
accountId
|
|
12696
|
+
accountId?: string | undefined;
|
|
12697
12697
|
}, {
|
|
12698
12698
|
providerId: string;
|
|
12699
|
-
accountId
|
|
12699
|
+
accountId?: string | undefined;
|
|
12700
12700
|
}>;
|
|
12701
12701
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
12702
12702
|
session: {
|
|
@@ -12739,13 +12739,13 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
|
|
|
12739
12739
|
method: "POST";
|
|
12740
12740
|
body: zod.ZodObject<{
|
|
12741
12741
|
providerId: zod.ZodString;
|
|
12742
|
-
accountId: zod.ZodString
|
|
12742
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
12743
12743
|
}, "strip", zod.ZodTypeAny, {
|
|
12744
12744
|
providerId: string;
|
|
12745
|
-
accountId
|
|
12745
|
+
accountId?: string | undefined;
|
|
12746
12746
|
}, {
|
|
12747
12747
|
providerId: string;
|
|
12748
|
-
accountId
|
|
12748
|
+
accountId?: string | undefined;
|
|
12749
12749
|
}>;
|
|
12750
12750
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
12751
12751
|
session: {
|
|
@@ -16237,13 +16237,13 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
|
|
|
16237
16237
|
method: "POST";
|
|
16238
16238
|
body: zod.ZodObject<{
|
|
16239
16239
|
providerId: zod.ZodString;
|
|
16240
|
-
accountId: zod.ZodString
|
|
16240
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
16241
16241
|
}, "strip", zod.ZodTypeAny, {
|
|
16242
16242
|
providerId: string;
|
|
16243
|
-
accountId
|
|
16243
|
+
accountId?: string | undefined;
|
|
16244
16244
|
}, {
|
|
16245
16245
|
providerId: string;
|
|
16246
|
-
accountId
|
|
16246
|
+
accountId?: string | undefined;
|
|
16247
16247
|
}>;
|
|
16248
16248
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
16249
16249
|
session: {
|
|
@@ -16286,13 +16286,13 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
|
|
|
16286
16286
|
method: "POST";
|
|
16287
16287
|
body: zod.ZodObject<{
|
|
16288
16288
|
providerId: zod.ZodString;
|
|
16289
|
-
accountId: zod.ZodString
|
|
16289
|
+
accountId: zod.ZodOptional<zod.ZodString>;
|
|
16290
16290
|
}, "strip", zod.ZodTypeAny, {
|
|
16291
16291
|
providerId: string;
|
|
16292
|
-
accountId
|
|
16292
|
+
accountId?: string | undefined;
|
|
16293
16293
|
}, {
|
|
16294
16294
|
providerId: string;
|
|
16295
|
-
accountId
|
|
16295
|
+
accountId?: string | undefined;
|
|
16296
16296
|
}>;
|
|
16297
16297
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
16298
16298
|
session: {
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BetterAuthPlugin, a3 as InferFieldsInputClient, a1 as InferFieldsOutput, U as User, S as Session, i as Auth } from '../shared/better-auth.
|
|
2
|
-
export { u as Account, g as Adapter, x as AdapterInstance, w as AdapterSchemaCreation, r as AdditionalSessionFieldsInput, s as AdditionalSessionFieldsOutput, p as AdditionalUserFieldsInput, q as AdditionalUserFieldsOutput, l as AuthContext, A as AuthPluginSchema, f as BetterAuthOptions, z as FilterActions, F as FilteredAPI, G as GenericEndpointContext, H as HookEndpointContext, D as InferAPI, I as InferOptionSchema, a as InferPluginErrorCodes, t as InferPluginTypes, k as InferSession, C as InferSessionAPI, j as InferUser, M as Models, R as RateLimit, y as SecondaryStorage, V as Verification, W as Where, v as init } from '../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthPlugin, a3 as InferFieldsInputClient, a1 as InferFieldsOutput, U as User, S as Session, i as Auth } from '../shared/better-auth.feQWZZzF.cjs';
|
|
2
|
+
export { u as Account, g as Adapter, x as AdapterInstance, w as AdapterSchemaCreation, r as AdditionalSessionFieldsInput, s as AdditionalSessionFieldsOutput, p as AdditionalUserFieldsInput, q as AdditionalUserFieldsOutput, l as AuthContext, A as AuthPluginSchema, f as BetterAuthOptions, z as FilterActions, F as FilteredAPI, G as GenericEndpointContext, H as HookEndpointContext, D as InferAPI, I as InferOptionSchema, a as InferPluginErrorCodes, t as InferPluginTypes, k as InferSession, C as InferSessionAPI, j as InferUser, M as Models, R as RateLimit, y as SecondaryStorage, V as Verification, W as Where, v as init } from '../shared/better-auth.feQWZZzF.cjs';
|
|
3
3
|
import { BetterFetchOption, BetterFetchResponse, BetterFetch, BetterFetchPlugin } from '@better-fetch/fetch';
|
|
4
4
|
import { WritableAtom, Atom } from 'nanostores';
|
|
5
5
|
import { U as UnionToIntersection, H as HasRequiredKeys, b as Prettify, L as LiteralString, S as StripEmptyObjects } from '../shared/better-auth.Bi8FQwDD.cjs';
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BetterAuthPlugin, a3 as InferFieldsInputClient, a1 as InferFieldsOutput, U as User, S as Session, i as Auth } from '../shared/better-auth.
|
|
2
|
-
export { u as Account, g as Adapter, x as AdapterInstance, w as AdapterSchemaCreation, r as AdditionalSessionFieldsInput, s as AdditionalSessionFieldsOutput, p as AdditionalUserFieldsInput, q as AdditionalUserFieldsOutput, l as AuthContext, A as AuthPluginSchema, f as BetterAuthOptions, z as FilterActions, F as FilteredAPI, G as GenericEndpointContext, H as HookEndpointContext, D as InferAPI, I as InferOptionSchema, a as InferPluginErrorCodes, t as InferPluginTypes, k as InferSession, C as InferSessionAPI, j as InferUser, M as Models, R as RateLimit, y as SecondaryStorage, V as Verification, W as Where, v as init } from '../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthPlugin, a3 as InferFieldsInputClient, a1 as InferFieldsOutput, U as User, S as Session, i as Auth } from '../shared/better-auth.Ci5pgoju.mjs';
|
|
2
|
+
export { u as Account, g as Adapter, x as AdapterInstance, w as AdapterSchemaCreation, r as AdditionalSessionFieldsInput, s as AdditionalSessionFieldsOutput, p as AdditionalUserFieldsInput, q as AdditionalUserFieldsOutput, l as AuthContext, A as AuthPluginSchema, f as BetterAuthOptions, z as FilterActions, F as FilteredAPI, G as GenericEndpointContext, H as HookEndpointContext, D as InferAPI, I as InferOptionSchema, a as InferPluginErrorCodes, t as InferPluginTypes, k as InferSession, C as InferSessionAPI, j as InferUser, M as Models, R as RateLimit, y as SecondaryStorage, V as Verification, W as Where, v as init } from '../shared/better-auth.Ci5pgoju.mjs';
|
|
3
3
|
import { BetterFetchOption, BetterFetchResponse, BetterFetch, BetterFetchPlugin } from '@better-fetch/fetch';
|
|
4
4
|
import { WritableAtom, Atom } from 'nanostores';
|
|
5
5
|
import { U as UnionToIntersection, H as HasRequiredKeys, b as Prettify, L as LiteralString, S as StripEmptyObjects } from '../shared/better-auth.Bi8FQwDD.mjs';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BetterAuthPlugin, a3 as InferFieldsInputClient, a1 as InferFieldsOutput, U as User, S as Session, i as Auth } from '../shared/better-auth.
|
|
2
|
-
export { u as Account, g as Adapter, x as AdapterInstance, w as AdapterSchemaCreation, r as AdditionalSessionFieldsInput, s as AdditionalSessionFieldsOutput, p as AdditionalUserFieldsInput, q as AdditionalUserFieldsOutput, l as AuthContext, A as AuthPluginSchema, f as BetterAuthOptions, z as FilterActions, F as FilteredAPI, G as GenericEndpointContext, H as HookEndpointContext, D as InferAPI, I as InferOptionSchema, a as InferPluginErrorCodes, t as InferPluginTypes, k as InferSession, C as InferSessionAPI, j as InferUser, M as Models, R as RateLimit, y as SecondaryStorage, V as Verification, W as Where, v as init } from '../shared/better-auth.
|
|
1
|
+
import { B as BetterAuthPlugin, a3 as InferFieldsInputClient, a1 as InferFieldsOutput, U as User, S as Session, i as Auth } from '../shared/better-auth.DPgLMy-i.js';
|
|
2
|
+
export { u as Account, g as Adapter, x as AdapterInstance, w as AdapterSchemaCreation, r as AdditionalSessionFieldsInput, s as AdditionalSessionFieldsOutput, p as AdditionalUserFieldsInput, q as AdditionalUserFieldsOutput, l as AuthContext, A as AuthPluginSchema, f as BetterAuthOptions, z as FilterActions, F as FilteredAPI, G as GenericEndpointContext, H as HookEndpointContext, D as InferAPI, I as InferOptionSchema, a as InferPluginErrorCodes, t as InferPluginTypes, k as InferSession, C as InferSessionAPI, j as InferUser, M as Models, R as RateLimit, y as SecondaryStorage, V as Verification, W as Where, v as init } from '../shared/better-auth.DPgLMy-i.js';
|
|
3
3
|
import { BetterFetchOption, BetterFetchResponse, BetterFetch, BetterFetchPlugin } from '@better-fetch/fetch';
|
|
4
4
|
import { WritableAtom, Atom } from 'nanostores';
|
|
5
5
|
import { U as UnionToIntersection, H as HasRequiredKeys, b as Prettify, L as LiteralString, S as StripEmptyObjects } from '../shared/better-auth.Bi8FQwDD.js';
|