better-auth 1.2.6-beta.7 → 1.2.7-beta.1
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.cjs +186 -249
- package/dist/adapters/drizzle-adapter/index.d.cts +11 -49
- package/dist/adapters/drizzle-adapter/index.d.mts +11 -49
- package/dist/adapters/drizzle-adapter/index.d.ts +11 -49
- package/dist/adapters/drizzle-adapter/index.mjs +186 -249
- package/dist/adapters/index.cjs +26 -0
- package/dist/adapters/index.d.cts +17 -0
- package/dist/adapters/index.d.mts +17 -0
- package/dist/adapters/index.d.ts +17 -0
- package/dist/adapters/index.mjs +20 -0
- package/dist/adapters/kysely-adapter/index.cjs +7 -7
- package/dist/adapters/kysely-adapter/index.d.cts +17 -49
- package/dist/adapters/kysely-adapter/index.d.mts +17 -49
- package/dist/adapters/kysely-adapter/index.d.ts +17 -49
- package/dist/adapters/kysely-adapter/index.mjs +8 -8
- package/dist/adapters/memory-adapter/index.cjs +7 -8
- package/dist/adapters/memory-adapter/index.d.cts +9 -49
- package/dist/adapters/memory-adapter/index.d.mts +9 -49
- package/dist/adapters/memory-adapter/index.d.ts +9 -49
- package/dist/adapters/memory-adapter/index.mjs +8 -9
- package/dist/adapters/mongodb-adapter/index.cjs +2 -2
- package/dist/adapters/mongodb-adapter/index.d.cts +4 -4
- package/dist/adapters/mongodb-adapter/index.d.mts +4 -4
- package/dist/adapters/mongodb-adapter/index.d.ts +4 -4
- package/dist/adapters/mongodb-adapter/index.mjs +3 -3
- package/dist/adapters/prisma-adapter/index.cjs +130 -203
- package/dist/adapters/prisma-adapter/index.d.cts +17 -49
- package/dist/adapters/prisma-adapter/index.d.mts +17 -49
- package/dist/adapters/prisma-adapter/index.d.ts +17 -49
- package/dist/adapters/prisma-adapter/index.mjs +131 -204
- package/dist/adapters/test.cjs +710 -377
- package/dist/adapters/test.d.cts +64 -5
- package/dist/adapters/test.d.mts +64 -5
- package/dist/adapters/test.d.ts +64 -5
- package/dist/adapters/test.mjs +712 -380
- package/dist/api/index.cjs +61 -25
- package/dist/api/index.d.cts +3 -3
- package/dist/api/index.d.mts +3 -3
- package/dist/api/index.d.ts +3 -3
- package/dist/api/index.mjs +63 -27
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.mts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/plugins/index.cjs +13 -15
- package/dist/client/plugins/index.d.cts +80 -19
- package/dist/client/plugins/index.d.mts +80 -19
- package/dist/client/plugins/index.d.ts +80 -19
- package/dist/client/plugins/index.mjs +13 -16
- package/dist/client/react/index.cjs +4 -4
- package/dist/client/react/index.d.cts +3 -3
- package/dist/client/react/index.d.mts +3 -3
- package/dist/client/react/index.d.ts +3 -3
- package/dist/client/solid/index.d.cts +3 -3
- package/dist/client/solid/index.d.mts +3 -3
- package/dist/client/solid/index.d.ts +3 -3
- package/dist/client/svelte/index.d.cts +3 -3
- package/dist/client/svelte/index.d.mts +3 -3
- package/dist/client/svelte/index.d.ts +3 -3
- package/dist/client/vue/index.d.cts +3 -3
- package/dist/client/vue/index.d.mts +3 -3
- package/dist/client/vue/index.d.ts +3 -3
- package/dist/cookies/index.cjs +13 -2
- package/dist/cookies/index.d.cts +3 -3
- package/dist/cookies/index.d.mts +3 -3
- package/dist/cookies/index.d.ts +3 -3
- package/dist/cookies/index.mjs +13 -2
- package/dist/db/index.cjs +6 -5
- package/dist/db/index.d.cts +4 -4
- package/dist/db/index.d.mts +4 -4
- package/dist/db/index.d.ts +4 -4
- package/dist/db/index.mjs +7 -6
- package/dist/index.cjs +11 -7
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +14 -10
- package/dist/integrations/next-js.cjs +4 -5
- package/dist/integrations/next-js.d.cts +3 -3
- package/dist/integrations/next-js.d.mts +3 -3
- package/dist/integrations/next-js.d.ts +3 -3
- package/dist/integrations/next-js.mjs +5 -6
- package/dist/integrations/node.d.cts +3 -3
- package/dist/integrations/node.d.mts +3 -3
- package/dist/integrations/node.d.ts +3 -3
- package/dist/integrations/react-start.cjs +5 -6
- package/dist/integrations/react-start.d.cts +3 -3
- package/dist/integrations/react-start.d.mts +3 -3
- package/dist/integrations/react-start.d.ts +3 -3
- package/dist/integrations/react-start.mjs +6 -7
- package/dist/integrations/svelte-kit.d.cts +3 -3
- package/dist/integrations/svelte-kit.d.mts +3 -3
- package/dist/integrations/svelte-kit.d.ts +3 -3
- package/dist/oauth2/index.d.cts +5 -5
- package/dist/oauth2/index.d.mts +5 -5
- package/dist/oauth2/index.d.ts +5 -5
- package/dist/plugins/access/index.d.cts +1 -1
- package/dist/plugins/access/index.d.mts +1 -1
- package/dist/plugins/access/index.d.ts +1 -1
- package/dist/plugins/admin/access/index.d.cts +1 -1
- package/dist/plugins/admin/access/index.d.mts +1 -1
- package/dist/plugins/admin/access/index.d.ts +1 -1
- package/dist/plugins/admin/index.cjs +4 -4
- package/dist/plugins/admin/index.d.cts +74 -14
- package/dist/plugins/admin/index.d.mts +74 -14
- package/dist/plugins/admin/index.d.ts +74 -14
- package/dist/plugins/admin/index.mjs +5 -5
- package/dist/plugins/anonymous/index.cjs +4 -5
- package/dist/plugins/anonymous/index.d.cts +3 -3
- package/dist/plugins/anonymous/index.d.mts +3 -3
- package/dist/plugins/anonymous/index.d.ts +3 -3
- package/dist/plugins/anonymous/index.mjs +5 -6
- package/dist/plugins/bearer/index.cjs +2 -2
- package/dist/plugins/bearer/index.d.cts +3 -3
- package/dist/plugins/bearer/index.d.mts +3 -3
- package/dist/plugins/bearer/index.d.ts +3 -3
- package/dist/plugins/bearer/index.mjs +3 -3
- package/dist/plugins/captcha/index.cjs +110 -45
- package/dist/plugins/captcha/index.d.cts +26 -6
- package/dist/plugins/captcha/index.d.mts +26 -6
- package/dist/plugins/captcha/index.d.ts +26 -6
- package/dist/plugins/captcha/index.mjs +110 -45
- package/dist/plugins/custom-session/index.cjs +24 -5
- package/dist/plugins/custom-session/index.d.cts +25 -6
- package/dist/plugins/custom-session/index.d.mts +25 -6
- package/dist/plugins/custom-session/index.d.ts +25 -6
- package/dist/plugins/custom-session/index.mjs +25 -6
- package/dist/plugins/email-otp/index.cjs +96 -30
- package/dist/plugins/email-otp/index.d.cts +33 -10
- package/dist/plugins/email-otp/index.d.mts +33 -10
- package/dist/plugins/email-otp/index.d.ts +33 -10
- package/dist/plugins/email-otp/index.mjs +97 -31
- package/dist/plugins/generic-oauth/index.cjs +81 -20
- package/dist/plugins/generic-oauth/index.d.cts +46 -3
- package/dist/plugins/generic-oauth/index.d.mts +46 -3
- package/dist/plugins/generic-oauth/index.d.ts +46 -3
- package/dist/plugins/generic-oauth/index.mjs +82 -21
- package/dist/plugins/haveibeenpwned/index.cjs +98 -0
- package/dist/plugins/haveibeenpwned/index.d.cts +36 -0
- package/dist/plugins/haveibeenpwned/index.d.mts +36 -0
- package/dist/plugins/haveibeenpwned/index.d.ts +36 -0
- package/dist/plugins/haveibeenpwned/index.mjs +96 -0
- package/dist/plugins/index.cjs +583 -19
- package/dist/plugins/index.d.cts +7 -5
- package/dist/plugins/index.d.mts +7 -5
- package/dist/plugins/index.d.ts +7 -5
- package/dist/plugins/index.mjs +583 -21
- package/dist/plugins/jwt/index.cjs +45 -21
- package/dist/plugins/jwt/index.d.cts +52 -6
- package/dist/plugins/jwt/index.d.mts +52 -6
- package/dist/plugins/jwt/index.d.ts +52 -6
- package/dist/plugins/jwt/index.mjs +46 -22
- package/dist/plugins/magic-link/index.cjs +3 -3
- package/dist/plugins/magic-link/index.mjs +4 -4
- package/dist/plugins/multi-session/index.cjs +3 -3
- package/dist/plugins/multi-session/index.d.cts +3 -3
- package/dist/plugins/multi-session/index.d.mts +3 -3
- package/dist/plugins/multi-session/index.d.ts +3 -3
- package/dist/plugins/multi-session/index.mjs +4 -4
- package/dist/plugins/oauth-proxy/index.cjs +4 -4
- package/dist/plugins/oauth-proxy/index.d.cts +3 -3
- package/dist/plugins/oauth-proxy/index.d.mts +3 -3
- package/dist/plugins/oauth-proxy/index.d.ts +3 -3
- package/dist/plugins/oauth-proxy/index.mjs +5 -5
- package/dist/plugins/oidc-provider/index.cjs +227 -8
- package/dist/plugins/oidc-provider/index.d.cts +215 -3
- package/dist/plugins/oidc-provider/index.d.mts +215 -3
- package/dist/plugins/oidc-provider/index.d.ts +215 -3
- package/dist/plugins/oidc-provider/index.mjs +228 -9
- package/dist/plugins/one-tap/index.cjs +5 -5
- package/dist/plugins/one-tap/index.mjs +6 -6
- package/dist/plugins/one-time-token/index.cjs +119 -0
- package/dist/plugins/one-time-token/index.d.cts +134 -0
- package/dist/plugins/one-time-token/index.d.mts +134 -0
- package/dist/plugins/one-time-token/index.d.ts +134 -0
- package/dist/plugins/one-time-token/index.mjs +117 -0
- package/dist/plugins/open-api/index.cjs +3 -3
- package/dist/plugins/open-api/index.d.cts +3 -3
- package/dist/plugins/open-api/index.d.mts +3 -3
- package/dist/plugins/open-api/index.d.ts +3 -3
- package/dist/plugins/open-api/index.mjs +4 -4
- package/dist/plugins/organization/access/index.d.cts +1 -1
- package/dist/plugins/organization/access/index.d.mts +1 -1
- package/dist/plugins/organization/access/index.d.ts +1 -1
- package/dist/plugins/organization/index.cjs +4 -4
- package/dist/plugins/organization/index.d.cts +708 -55
- package/dist/plugins/organization/index.d.mts +708 -55
- package/dist/plugins/organization/index.d.ts +708 -55
- package/dist/plugins/organization/index.mjs +5 -5
- package/dist/plugins/passkey/index.cjs +82 -8
- package/dist/plugins/passkey/index.d.cts +72 -3
- package/dist/plugins/passkey/index.d.mts +72 -3
- package/dist/plugins/passkey/index.d.ts +72 -3
- package/dist/plugins/passkey/index.mjs +83 -9
- package/dist/plugins/phone-number/index.cjs +194 -26
- package/dist/plugins/phone-number/index.d.cts +132 -8
- package/dist/plugins/phone-number/index.d.mts +132 -8
- package/dist/plugins/phone-number/index.d.ts +132 -8
- package/dist/plugins/phone-number/index.mjs +195 -27
- package/dist/plugins/sso/index.cjs +190 -7
- package/dist/plugins/sso/index.d.cts +181 -15
- package/dist/plugins/sso/index.d.mts +181 -15
- package/dist/plugins/sso/index.d.ts +181 -15
- package/dist/plugins/sso/index.mjs +191 -8
- package/dist/plugins/two-factor/index.cjs +443 -92
- package/dist/plugins/two-factor/index.d.cts +230 -396
- package/dist/plugins/two-factor/index.d.mts +230 -396
- package/dist/plugins/two-factor/index.d.ts +230 -396
- package/dist/plugins/two-factor/index.mjs +431 -80
- package/dist/plugins/username/index.cjs +34 -31
- package/dist/plugins/username/index.d.cts +15 -12
- package/dist/plugins/username/index.d.mts +15 -12
- package/dist/plugins/username/index.d.ts +15 -12
- package/dist/plugins/username/index.mjs +35 -32
- package/dist/shared/better-auth.1DR6suCQ.mjs +307 -0
- package/dist/shared/{better-auth.BSsp73pg.cjs → better-auth.B7cZ2juS.cjs} +15 -14
- package/dist/shared/{better-auth.bKwabe3I.d.mts → better-auth.B88xucNq.d.mts} +529 -39
- package/dist/shared/{better-auth.CApEjVDP.cjs → better-auth.BW8BpneG.cjs} +4 -1
- package/dist/shared/{better-auth.BiQsvaIP.d.cts → better-auth.BcU1Kjyq.d.cts} +2051 -518
- package/dist/shared/better-auth.BfG24BjZ.cjs +118 -0
- package/dist/shared/{better-auth.A3TjrU8G.mjs → better-auth.Bk5IMdhM.mjs} +32 -12
- package/dist/shared/{better-auth.D9VnBkRI.mjs → better-auth.Bm9HxIzE.mjs} +47 -24
- package/dist/shared/{better-auth.BRf6Iynu.d.ts → better-auth.Bwc-6kOr.d.ts} +1 -1
- package/dist/shared/{better-auth.D-oLmHIj.d.mts → better-auth.CA2hFK4N.d.ts} +2051 -518
- package/dist/shared/{better-auth.Dmhe30iW.d.mts → better-auth.CGukGrxT.d.cts} +1 -1
- package/dist/shared/{better-auth.CsSpq0zL.cjs → better-auth.CHUzBidy.cjs} +46 -23
- package/dist/shared/{better-auth.DWRligF8.d.cts → better-auth.CT9J6rD-.d.cts} +539 -7
- package/dist/shared/better-auth.CVCo5Z2T.cjs +310 -0
- package/dist/shared/{better-auth.D4jH-sJA.mjs → better-auth.CWwVo_61.mjs} +458 -118
- package/dist/shared/{better-auth.Bi8FQwDD.d.cts → better-auth.CYegVoq1.d.cts} +1 -1
- package/dist/shared/{better-auth.Bi8FQwDD.d.mts → better-auth.CYegVoq1.d.mts} +1 -1
- package/dist/shared/{better-auth.Bi8FQwDD.d.ts → better-auth.CYegVoq1.d.ts} +1 -1
- package/dist/shared/{better-auth.CepcSj5H.mjs → better-auth.Cc72UxUH.mjs} +1 -2
- package/dist/shared/{better-auth.BWp5dztg.d.ts → better-auth.CmN4mlPh.d.ts} +539 -7
- package/dist/shared/{better-auth.DH3YjMQH.mjs → better-auth.Cqykj82J.mjs} +1 -1
- package/dist/shared/{better-auth.wcdMj2cT.d.mts → better-auth.DIt2e3lu.d.mts} +539 -7
- package/dist/shared/{better-auth.BANAxdkL.d.ts → better-auth.DNTAFSt1.d.ts} +529 -39
- package/dist/shared/{better-auth.DU2QNVc_.d.ts → better-auth.DQ7OSJbI.d.mts} +2051 -518
- package/dist/shared/{better-auth.DLTzKoOS.cjs → better-auth.DSVbLSt7.cjs} +4 -1
- package/dist/shared/{better-auth.B2Fw1vhH.d.cts → better-auth.DTiSPWEk.d.cts} +529 -39
- package/dist/shared/better-auth.DURsStt9.mjs +116 -0
- package/dist/shared/{better-auth.BIjcZ_vt.cjs → better-auth.DYoLD99C.cjs} +31 -11
- package/dist/shared/{better-auth.CV1L7TPV.cjs → better-auth.D_ZIX1O8.cjs} +317 -47
- package/dist/shared/{better-auth.C5H9XEzZ.cjs → better-auth.DcWKCjjf.cjs} +1 -2
- package/dist/shared/{better-auth.BDYXUcLv.cjs → better-auth.Dg0siV5C.cjs} +457 -117
- package/dist/shared/better-auth.DjryM8pE.cjs +760 -0
- package/dist/shared/{better-auth.DPBQN9Fs.mjs → better-auth.Dn_Ms1Uf.mjs} +318 -48
- package/dist/shared/{better-auth.DiG4KL2x.mjs → better-auth.OuYYTHC7.mjs} +4 -1
- package/dist/shared/{better-auth.DtC8i3pf.d.cts → better-auth.S1jimRbX.d.mts} +1 -1
- package/dist/shared/better-auth.SPmq4a4z.d.mts +344 -0
- package/dist/shared/{better-auth.cOCrlspr.mjs → better-auth.bkwPl2G4.mjs} +4 -1
- package/dist/shared/better-auth.cp2rC2iM.d.ts +344 -0
- package/dist/shared/better-auth.eVy4DZvP.d.cts +344 -0
- package/dist/shared/{better-auth.BrOpzmqo.mjs → better-auth.iKoUsdFE.mjs} +15 -14
- package/dist/shared/better-auth.rSYJCd3o.mjs +758 -0
- package/dist/social-providers/index.cjs +75 -3
- package/dist/social-providers/index.d.cts +2 -2
- package/dist/social-providers/index.d.mts +2 -2
- package/dist/social-providers/index.d.ts +2 -2
- package/dist/social-providers/index.mjs +77 -6
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/package.json +42 -5
- package/dist/chunks/server.cjs +0 -905
- package/dist/chunks/server.mjs +0 -895
- package/dist/shared/better-auth.BcoSd9tC.mjs +0 -10
- package/dist/shared/better-auth.BnRFp-t0.mjs +0 -405
- package/dist/shared/better-auth.C1-vpKly.cjs +0 -12
- package/dist/shared/better-auth.ClTSOgiD.mjs +0 -140
- package/dist/shared/better-auth.DC8JQbiE.mjs +0 -173
- package/dist/shared/better-auth.DWHWPllD.cjs +0 -175
- package/dist/shared/better-auth.DqLjzBlO.cjs +0 -408
- package/dist/shared/better-auth.m575EIBC.cjs +0 -144
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { atom } from 'nanostores';
|
|
2
2
|
import '@better-fetch/fetch';
|
|
3
3
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
4
|
-
import { B as BetterAuthError } from '../../shared/better-auth.DdzSJf-n.mjs';
|
|
5
4
|
import { u as useAuthQuery } from '../../shared/better-auth.CQvoVIBD.mjs';
|
|
6
5
|
import { ownerAc, memberAc, adminAc } from '../../plugins/organization/access/index.mjs';
|
|
7
|
-
import { h as hasPermission } from '../../shared/better-auth.
|
|
6
|
+
import { h as hasPermission } from '../../shared/better-auth.OuYYTHC7.mjs';
|
|
8
7
|
import { startRegistration, WebAuthnError, startAuthentication } from '@simplewebauthn/browser';
|
|
9
8
|
export { t as twoFactorClient } from '../../shared/better-auth.Ddw8bVyV.mjs';
|
|
10
9
|
import { userAc, adminAc as adminAc$1 } from '../../plugins/admin/access/index.mjs';
|
|
11
|
-
import { h as hasPermission$1 } from '../../shared/better-auth.
|
|
10
|
+
import { h as hasPermission$1 } from '../../shared/better-auth.bkwPl2G4.mjs';
|
|
12
11
|
import '../../plugins/access/index.mjs';
|
|
12
|
+
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
13
13
|
|
|
14
14
|
const organizationClient = (options) => {
|
|
15
15
|
const $listOrg = atom(false);
|
|
@@ -34,18 +34,13 @@ const organizationClient = (options) => {
|
|
|
34
34
|
},
|
|
35
35
|
organization: {
|
|
36
36
|
checkRolePermission: (data) => {
|
|
37
|
-
if (Object.keys(data.permission).length > 1) {
|
|
38
|
-
throw new BetterAuthError(
|
|
39
|
-
"you can only check one resource permission at a time."
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
37
|
const isAuthorized = hasPermission({
|
|
43
38
|
role: data.role,
|
|
44
39
|
options: {
|
|
45
40
|
ac: options?.ac,
|
|
46
41
|
roles
|
|
47
42
|
},
|
|
48
|
-
|
|
43
|
+
permissions: data.permissions ?? data.permission
|
|
49
44
|
});
|
|
50
45
|
return isAuthorized;
|
|
51
46
|
}
|
|
@@ -348,18 +343,13 @@ const adminClient = (options) => {
|
|
|
348
343
|
getActions: ($fetch) => ({
|
|
349
344
|
admin: {
|
|
350
345
|
checkRolePermission: (data) => {
|
|
351
|
-
if (Object.keys(data.permission).length > 1) {
|
|
352
|
-
throw new BetterAuthError(
|
|
353
|
-
"you can only check one resource permission at a time."
|
|
354
|
-
);
|
|
355
|
-
}
|
|
356
346
|
const isAuthorized = hasPermission$1({
|
|
357
347
|
role: data.role,
|
|
358
348
|
options: {
|
|
359
349
|
ac: options?.ac,
|
|
360
350
|
roles
|
|
361
351
|
},
|
|
362
|
-
|
|
352
|
+
permissions: data.permissions ?? data.permission
|
|
363
353
|
});
|
|
364
354
|
return isAuthorized;
|
|
365
355
|
}
|
|
@@ -551,4 +541,11 @@ const apiKeyClient = () => {
|
|
|
551
541
|
};
|
|
552
542
|
};
|
|
553
543
|
|
|
554
|
-
|
|
544
|
+
const oneTimeTokenClient = () => {
|
|
545
|
+
return {
|
|
546
|
+
id: "one-time-token",
|
|
547
|
+
$InferServerPlugin: {}
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
export { InferServerPlugin, adminClient, anonymousClient, apiKeyClient, customSessionClient, emailOTPClient, genericOAuthClient, getPasskeyActions, inferAdditionalFields, jwtClient, magicLinkClient, multiSessionClient, oidcClient, oneTapClient, oneTimeTokenClient, organizationClient, passkeyClient, phoneNumberClient, ssoClient, usernameClient };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const proxy = require('../../shared/better-auth.R2B_T2k0.cjs');
|
|
4
4
|
const nanostores = require('nanostores');
|
|
5
|
-
const
|
|
5
|
+
const react = require('react');
|
|
6
6
|
require('@better-fetch/fetch');
|
|
7
7
|
require('../../shared/better-auth.C-R0J0n1.cjs');
|
|
8
8
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
@@ -11,9 +11,9 @@ require('../../shared/better-auth.C_Zl7Etp.cjs');
|
|
|
11
11
|
require('../../shared/better-auth.DhsGZ30Q.cjs');
|
|
12
12
|
|
|
13
13
|
function useStore(store, options = {}) {
|
|
14
|
-
let snapshotRef =
|
|
14
|
+
let snapshotRef = react.useRef(store.get());
|
|
15
15
|
const { keys, deps = [store, keys] } = options;
|
|
16
|
-
let subscribe =
|
|
16
|
+
let subscribe = react.useCallback((onChange) => {
|
|
17
17
|
const emitChange = (value) => {
|
|
18
18
|
if (snapshotRef.current === value) return;
|
|
19
19
|
snapshotRef.current = value;
|
|
@@ -26,7 +26,7 @@ function useStore(store, options = {}) {
|
|
|
26
26
|
return store.listen(emitChange);
|
|
27
27
|
}, deps);
|
|
28
28
|
let get = () => snapshotRef.current;
|
|
29
|
-
return
|
|
29
|
+
return react.useSyncExternalStore(subscribe, get, get);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
function getAtomKey(str) {
|
|
@@ -5,12 +5,12 @@ import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
|
5
5
|
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
|
-
import { U as UnionToIntersection,
|
|
8
|
+
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.cjs';
|
|
9
9
|
import { DependencyList } from 'react';
|
|
10
|
-
import {
|
|
10
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.BcU1Kjyq.cjs';
|
|
11
11
|
import 'better-call';
|
|
12
12
|
import 'zod';
|
|
13
|
-
import '../../shared/better-auth.
|
|
13
|
+
import '../../shared/better-auth.DTiSPWEk.cjs';
|
|
14
14
|
import 'jose';
|
|
15
15
|
import 'kysely';
|
|
16
16
|
import 'better-sqlite3';
|
|
@@ -5,12 +5,12 @@ import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
|
5
5
|
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
|
-
import { U as UnionToIntersection,
|
|
8
|
+
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.mjs';
|
|
9
9
|
import { DependencyList } from 'react';
|
|
10
|
-
import {
|
|
10
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.DQ7OSJbI.mjs';
|
|
11
11
|
import 'better-call';
|
|
12
12
|
import 'zod';
|
|
13
|
-
import '../../shared/better-auth.
|
|
13
|
+
import '../../shared/better-auth.B88xucNq.mjs';
|
|
14
14
|
import 'jose';
|
|
15
15
|
import 'kysely';
|
|
16
16
|
import 'better-sqlite3';
|
|
@@ -5,12 +5,12 @@ import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
|
5
5
|
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
|
-
import { U as UnionToIntersection,
|
|
8
|
+
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.js';
|
|
9
9
|
import { DependencyList } from 'react';
|
|
10
|
-
import {
|
|
10
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.CA2hFK4N.js';
|
|
11
11
|
import 'better-call';
|
|
12
12
|
import 'zod';
|
|
13
|
-
import '../../shared/better-auth.
|
|
13
|
+
import '../../shared/better-auth.DNTAFSt1.js';
|
|
14
14
|
import 'jose';
|
|
15
15
|
import 'kysely';
|
|
16
16
|
import 'better-sqlite3';
|
|
@@ -3,12 +3,12 @@ import { BetterFetchError } from '@better-fetch/fetch';
|
|
|
3
3
|
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
|
-
import { U as UnionToIntersection,
|
|
7
|
-
import {
|
|
6
|
+
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.cjs';
|
|
7
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.BcU1Kjyq.cjs';
|
|
8
8
|
export * from 'nanostores';
|
|
9
9
|
import 'better-call';
|
|
10
10
|
import 'zod';
|
|
11
|
-
import '../../shared/better-auth.
|
|
11
|
+
import '../../shared/better-auth.DTiSPWEk.cjs';
|
|
12
12
|
import 'jose';
|
|
13
13
|
import 'kysely';
|
|
14
14
|
import 'better-sqlite3';
|
|
@@ -3,12 +3,12 @@ import { BetterFetchError } from '@better-fetch/fetch';
|
|
|
3
3
|
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
|
-
import { U as UnionToIntersection,
|
|
7
|
-
import {
|
|
6
|
+
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.mjs';
|
|
7
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.DQ7OSJbI.mjs';
|
|
8
8
|
export * from 'nanostores';
|
|
9
9
|
import 'better-call';
|
|
10
10
|
import 'zod';
|
|
11
|
-
import '../../shared/better-auth.
|
|
11
|
+
import '../../shared/better-auth.B88xucNq.mjs';
|
|
12
12
|
import 'jose';
|
|
13
13
|
import 'kysely';
|
|
14
14
|
import 'better-sqlite3';
|
|
@@ -3,12 +3,12 @@ import { BetterFetchError } from '@better-fetch/fetch';
|
|
|
3
3
|
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
|
-
import { U as UnionToIntersection,
|
|
7
|
-
import {
|
|
6
|
+
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.js';
|
|
7
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.CA2hFK4N.js';
|
|
8
8
|
export * from 'nanostores';
|
|
9
9
|
import 'better-call';
|
|
10
10
|
import 'zod';
|
|
11
|
-
import '../../shared/better-auth.
|
|
11
|
+
import '../../shared/better-auth.DNTAFSt1.js';
|
|
12
12
|
import 'jose';
|
|
13
13
|
import 'kysely';
|
|
14
14
|
import 'better-sqlite3';
|
|
@@ -5,11 +5,11 @@ import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
|
5
5
|
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
|
-
import { U as UnionToIntersection,
|
|
9
|
-
import {
|
|
8
|
+
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.cjs';
|
|
9
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.BcU1Kjyq.cjs';
|
|
10
10
|
import 'better-call';
|
|
11
11
|
import 'zod';
|
|
12
|
-
import '../../shared/better-auth.
|
|
12
|
+
import '../../shared/better-auth.DTiSPWEk.cjs';
|
|
13
13
|
import 'jose';
|
|
14
14
|
import 'kysely';
|
|
15
15
|
import 'better-sqlite3';
|
|
@@ -5,11 +5,11 @@ import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
|
5
5
|
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
|
-
import { U as UnionToIntersection,
|
|
9
|
-
import {
|
|
8
|
+
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.mjs';
|
|
9
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.DQ7OSJbI.mjs';
|
|
10
10
|
import 'better-call';
|
|
11
11
|
import 'zod';
|
|
12
|
-
import '../../shared/better-auth.
|
|
12
|
+
import '../../shared/better-auth.B88xucNq.mjs';
|
|
13
13
|
import 'jose';
|
|
14
14
|
import 'kysely';
|
|
15
15
|
import 'better-sqlite3';
|
|
@@ -5,11 +5,11 @@ import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
|
5
5
|
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
|
-
import { U as UnionToIntersection,
|
|
9
|
-
import {
|
|
8
|
+
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.js';
|
|
9
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.CA2hFK4N.js';
|
|
10
10
|
import 'better-call';
|
|
11
11
|
import 'zod';
|
|
12
|
-
import '../../shared/better-auth.
|
|
12
|
+
import '../../shared/better-auth.DNTAFSt1.js';
|
|
13
13
|
import 'jose';
|
|
14
14
|
import 'kysely';
|
|
15
15
|
import 'better-sqlite3';
|
|
@@ -5,11 +5,11 @@ import { BetterFetchError } from '@better-fetch/fetch';
|
|
|
5
5
|
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
|
-
import { U as UnionToIntersection,
|
|
9
|
-
import {
|
|
8
|
+
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.cjs';
|
|
9
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.BcU1Kjyq.cjs';
|
|
10
10
|
import 'better-call';
|
|
11
11
|
import 'zod';
|
|
12
|
-
import '../../shared/better-auth.
|
|
12
|
+
import '../../shared/better-auth.DTiSPWEk.cjs';
|
|
13
13
|
import 'jose';
|
|
14
14
|
import 'kysely';
|
|
15
15
|
import 'better-sqlite3';
|
|
@@ -5,11 +5,11 @@ import { BetterFetchError } from '@better-fetch/fetch';
|
|
|
5
5
|
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
|
-
import { U as UnionToIntersection,
|
|
9
|
-
import {
|
|
8
|
+
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.mjs';
|
|
9
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.DQ7OSJbI.mjs';
|
|
10
10
|
import 'better-call';
|
|
11
11
|
import 'zod';
|
|
12
|
-
import '../../shared/better-auth.
|
|
12
|
+
import '../../shared/better-auth.B88xucNq.mjs';
|
|
13
13
|
import 'jose';
|
|
14
14
|
import 'kysely';
|
|
15
15
|
import 'better-sqlite3';
|
|
@@ -5,11 +5,11 @@ import { BetterFetchError } from '@better-fetch/fetch';
|
|
|
5
5
|
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
|
-
import { U as UnionToIntersection,
|
|
9
|
-
import {
|
|
8
|
+
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.js';
|
|
9
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.CA2hFK4N.js';
|
|
10
10
|
import 'better-call';
|
|
11
11
|
import 'zod';
|
|
12
|
-
import '../../shared/better-auth.
|
|
12
|
+
import '../../shared/better-auth.DNTAFSt1.js';
|
|
13
13
|
import 'jose';
|
|
14
14
|
import 'kysely';
|
|
15
15
|
import 'better-sqlite3';
|
package/dist/cookies/index.cjs
CHANGED
|
@@ -250,9 +250,20 @@ function getCookies(options) {
|
|
|
250
250
|
async function setCookieCache(ctx, session) {
|
|
251
251
|
const shouldStoreSessionDataInCookie = ctx.context.options.session?.cookieCache?.enabled;
|
|
252
252
|
if (shouldStoreSessionDataInCookie) {
|
|
253
|
+
const filteredSession = Object.entries(session.session).reduce(
|
|
254
|
+
(acc, [key, value]) => {
|
|
255
|
+
const fieldConfig = ctx.context.options.session?.additionalFields?.[key];
|
|
256
|
+
if (!fieldConfig || fieldConfig.returned !== false) {
|
|
257
|
+
acc[key] = value;
|
|
258
|
+
}
|
|
259
|
+
return acc;
|
|
260
|
+
},
|
|
261
|
+
{}
|
|
262
|
+
);
|
|
263
|
+
const sessionData = { session: filteredSession, user: session.user };
|
|
253
264
|
const data = base64.base64Url.encode(
|
|
254
265
|
JSON.stringify({
|
|
255
|
-
session,
|
|
266
|
+
session: sessionData,
|
|
256
267
|
expiresAt: date.getDate(
|
|
257
268
|
ctx.context.authCookies.sessionData.options.maxAge || 60,
|
|
258
269
|
"sec"
|
|
@@ -260,7 +271,7 @@ async function setCookieCache(ctx, session) {
|
|
|
260
271
|
signature: await hmac.createHMAC("SHA-256", "base64urlnopad").sign(
|
|
261
272
|
ctx.context.secret,
|
|
262
273
|
JSON.stringify({
|
|
263
|
-
...
|
|
274
|
+
...sessionData,
|
|
264
275
|
expiresAt: date.getDate(
|
|
265
276
|
ctx.context.authCookies.sessionData.options.maxAge || 60,
|
|
266
277
|
"sec"
|
package/dist/cookies/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'better-call';
|
|
2
|
-
export {
|
|
3
|
-
import '../shared/better-auth.
|
|
2
|
+
export { ar as BetterAuthCookies, aw as EligibleCookies, ap as createCookieGetter, au as deleteSessionCookie, ay as getCookieCache, aq as getCookies, ax as getSessionCookie, av as parseCookies, az as parseSetCookieHeader, as as setCookieCache, aA as setCookieToHeader, at as setSessionCookie } from '../shared/better-auth.BcU1Kjyq.cjs';
|
|
3
|
+
import '../shared/better-auth.CYegVoq1.cjs';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import '../shared/better-auth.
|
|
5
|
+
import '../shared/better-auth.DTiSPWEk.cjs';
|
|
6
6
|
import 'jose';
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-sqlite3';
|
package/dist/cookies/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'better-call';
|
|
2
|
-
export {
|
|
3
|
-
import '../shared/better-auth.
|
|
2
|
+
export { ar as BetterAuthCookies, aw as EligibleCookies, ap as createCookieGetter, au as deleteSessionCookie, ay as getCookieCache, aq as getCookies, ax as getSessionCookie, av as parseCookies, az as parseSetCookieHeader, as as setCookieCache, aA as setCookieToHeader, at as setSessionCookie } from '../shared/better-auth.DQ7OSJbI.mjs';
|
|
3
|
+
import '../shared/better-auth.CYegVoq1.mjs';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import '../shared/better-auth.
|
|
5
|
+
import '../shared/better-auth.B88xucNq.mjs';
|
|
6
6
|
import 'jose';
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-sqlite3';
|
package/dist/cookies/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'better-call';
|
|
2
|
-
export {
|
|
3
|
-
import '../shared/better-auth.
|
|
2
|
+
export { ar as BetterAuthCookies, aw as EligibleCookies, ap as createCookieGetter, au as deleteSessionCookie, ay as getCookieCache, aq as getCookies, ax as getSessionCookie, av as parseCookies, az as parseSetCookieHeader, as as setCookieCache, aA as setCookieToHeader, at as setSessionCookie } from '../shared/better-auth.CA2hFK4N.js';
|
|
3
|
+
import '../shared/better-auth.CYegVoq1.js';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import '../shared/better-auth.
|
|
5
|
+
import '../shared/better-auth.DNTAFSt1.js';
|
|
6
6
|
import 'jose';
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-sqlite3';
|
package/dist/cookies/index.mjs
CHANGED
|
@@ -248,9 +248,20 @@ function getCookies(options) {
|
|
|
248
248
|
async function setCookieCache(ctx, session) {
|
|
249
249
|
const shouldStoreSessionDataInCookie = ctx.context.options.session?.cookieCache?.enabled;
|
|
250
250
|
if (shouldStoreSessionDataInCookie) {
|
|
251
|
+
const filteredSession = Object.entries(session.session).reduce(
|
|
252
|
+
(acc, [key, value]) => {
|
|
253
|
+
const fieldConfig = ctx.context.options.session?.additionalFields?.[key];
|
|
254
|
+
if (!fieldConfig || fieldConfig.returned !== false) {
|
|
255
|
+
acc[key] = value;
|
|
256
|
+
}
|
|
257
|
+
return acc;
|
|
258
|
+
},
|
|
259
|
+
{}
|
|
260
|
+
);
|
|
261
|
+
const sessionData = { session: filteredSession, user: session.user };
|
|
251
262
|
const data = base64Url.encode(
|
|
252
263
|
JSON.stringify({
|
|
253
|
-
session,
|
|
264
|
+
session: sessionData,
|
|
254
265
|
expiresAt: getDate(
|
|
255
266
|
ctx.context.authCookies.sessionData.options.maxAge || 60,
|
|
256
267
|
"sec"
|
|
@@ -258,7 +269,7 @@ async function setCookieCache(ctx, session) {
|
|
|
258
269
|
signature: await createHMAC("SHA-256", "base64urlnopad").sign(
|
|
259
270
|
ctx.context.secret,
|
|
260
271
|
JSON.stringify({
|
|
261
|
-
...
|
|
272
|
+
...sessionData,
|
|
262
273
|
expiresAt: getDate(
|
|
263
274
|
ctx.context.authCookies.sessionData.options.maxAge || 60,
|
|
264
275
|
"sec"
|
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.DYoLD99C.cjs');
|
|
4
4
|
const getTables = require('../shared/better-auth.BEphVDyL.cjs');
|
|
5
5
|
const zod = require('zod');
|
|
6
|
-
const schema = require('../shared/better-auth.
|
|
6
|
+
const schema = require('../shared/better-auth.DcWKCjjf.cjs');
|
|
7
7
|
require('../shared/better-auth.C1hdVENX.cjs');
|
|
8
|
-
require('../shared/better-auth.
|
|
8
|
+
require('../shared/better-auth.B7cZ2juS.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');
|
|
@@ -24,10 +24,11 @@ require('@noble/hashes/utils');
|
|
|
24
24
|
require('../shared/better-auth.CYeOI8C-.cjs');
|
|
25
25
|
require('../shared/better-auth.GpOOav9x.cjs');
|
|
26
26
|
require('../shared/better-auth.ANpbi45u.cjs');
|
|
27
|
-
require('../shared/better-auth.
|
|
27
|
+
require('../shared/better-auth.CVCo5Z2T.cjs');
|
|
28
28
|
require('kysely');
|
|
29
|
+
require('../shared/better-auth.DjryM8pE.cjs');
|
|
29
30
|
require('../shared/better-auth.CUdxApHl.cjs');
|
|
30
|
-
require('../shared/better-auth.
|
|
31
|
+
require('../shared/better-auth.BfG24BjZ.cjs');
|
|
31
32
|
|
|
32
33
|
const createFieldAttribute = (type, config) => {
|
|
33
34
|
return {
|
package/dist/db/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { g as Adapter, f as BetterAuthOptions, G as GenericEndpointContext, W as Where,
|
|
2
|
-
export {
|
|
1
|
+
import { g as Adapter, f as BetterAuthOptions, G as GenericEndpointContext, W as Where, F as FieldAttribute, Z as FieldType, K as KyselyDatabaseType } from '../shared/better-auth.BcU1Kjyq.cjs';
|
|
2
|
+
export { h as BetterAuthDbSchema, a0 as FieldAttributeConfig, a8 as InferFieldsFromOptions, a7 as InferFieldsFromPlugins, a4 as InferFieldsInput, a5 as InferFieldsInputClient, a3 as InferFieldsOutput, a2 as InferValueType, $ as InternalAdapter, a6 as PluginFieldAttribute, aa as accountSchema, a1 as createFieldAttribute, _ as createInternalAdapter, af as getAllFields, a9 as getAuthTables, ao as mergeSchema, am as parseAccountInput, ah as parseAccountOutput, al as parseAdditionalUserInput, aj as parseInputData, ae as parseOutputData, an as parseSessionInput, ai as parseSessionOutput, ak as parseUserInput, ag as parseUserOutput, ac as sessionSchema, ab as userSchema, ad as verificationSchema } from '../shared/better-auth.BcU1Kjyq.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import '../shared/better-auth.
|
|
5
|
-
import '../shared/better-auth.
|
|
4
|
+
import '../shared/better-auth.CYegVoq1.cjs';
|
|
5
|
+
import '../shared/better-auth.DTiSPWEk.cjs';
|
|
6
6
|
import 'jose';
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { g as Adapter, f as BetterAuthOptions, G as GenericEndpointContext, W as Where,
|
|
2
|
-
export {
|
|
1
|
+
import { g as Adapter, f as BetterAuthOptions, G as GenericEndpointContext, W as Where, F as FieldAttribute, Z as FieldType, K as KyselyDatabaseType } from '../shared/better-auth.DQ7OSJbI.mjs';
|
|
2
|
+
export { h as BetterAuthDbSchema, a0 as FieldAttributeConfig, a8 as InferFieldsFromOptions, a7 as InferFieldsFromPlugins, a4 as InferFieldsInput, a5 as InferFieldsInputClient, a3 as InferFieldsOutput, a2 as InferValueType, $ as InternalAdapter, a6 as PluginFieldAttribute, aa as accountSchema, a1 as createFieldAttribute, _ as createInternalAdapter, af as getAllFields, a9 as getAuthTables, ao as mergeSchema, am as parseAccountInput, ah as parseAccountOutput, al as parseAdditionalUserInput, aj as parseInputData, ae as parseOutputData, an as parseSessionInput, ai as parseSessionOutput, ak as parseUserInput, ag as parseUserOutput, ac as sessionSchema, ab as userSchema, ad as verificationSchema } from '../shared/better-auth.DQ7OSJbI.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import '../shared/better-auth.
|
|
5
|
-
import '../shared/better-auth.
|
|
4
|
+
import '../shared/better-auth.CYegVoq1.mjs';
|
|
5
|
+
import '../shared/better-auth.B88xucNq.mjs';
|
|
6
6
|
import 'jose';
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
package/dist/db/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { g as Adapter, f as BetterAuthOptions, G as GenericEndpointContext, W as Where,
|
|
2
|
-
export {
|
|
1
|
+
import { g as Adapter, f as BetterAuthOptions, G as GenericEndpointContext, W as Where, F as FieldAttribute, Z as FieldType, K as KyselyDatabaseType } from '../shared/better-auth.CA2hFK4N.js';
|
|
2
|
+
export { h as BetterAuthDbSchema, a0 as FieldAttributeConfig, a8 as InferFieldsFromOptions, a7 as InferFieldsFromPlugins, a4 as InferFieldsInput, a5 as InferFieldsInputClient, a3 as InferFieldsOutput, a2 as InferValueType, $ as InternalAdapter, a6 as PluginFieldAttribute, aa as accountSchema, a1 as createFieldAttribute, _ as createInternalAdapter, af as getAllFields, a9 as getAuthTables, ao as mergeSchema, am as parseAccountInput, ah as parseAccountOutput, al as parseAdditionalUserInput, aj as parseInputData, ae as parseOutputData, an as parseSessionInput, ai as parseSessionOutput, ak as parseUserInput, ag as parseUserOutput, ac as sessionSchema, ab as userSchema, ad as verificationSchema } from '../shared/better-auth.CA2hFK4N.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import '../shared/better-auth.
|
|
5
|
-
import '../shared/better-auth.
|
|
4
|
+
import '../shared/better-auth.CYegVoq1.js';
|
|
5
|
+
import '../shared/better-auth.DNTAFSt1.js';
|
|
6
6
|
import 'jose';
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
package/dist/db/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { d as convertFromDB, b as convertToDB, c as createInternalAdapter, a as getAdapter, e as getMigrations, f as getSchema, g as getWithHooks, m as matchType } from '../shared/better-auth.
|
|
1
|
+
export { d as convertFromDB, b as convertToDB, c as createInternalAdapter, a as getAdapter, e as getMigrations, f as getSchema, g as getWithHooks, m as matchType } from '../shared/better-auth.Bk5IMdhM.mjs';
|
|
2
2
|
export { g as getAuthTables } from '../shared/better-auth.DORkW_Ge.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
export { a as accountSchema, g as getAllFields, m as mergeSchema, i as parseAccountInput, c as parseAccountOutput, h as parseAdditionalUserInput, e as parseInputData, p as parseOutputData, j as parseSessionInput, d as parseSessionOutput, f as parseUserInput, b as parseUserOutput, s as sessionSchema, u as userSchema, v as verificationSchema } from '../shared/better-auth.
|
|
4
|
+
export { a as accountSchema, g as getAllFields, m as mergeSchema, i as parseAccountInput, c as parseAccountOutput, h as parseAdditionalUserInput, e as parseInputData, p as parseOutputData, j as parseSessionInput, d as parseSessionOutput, f as parseUserInput, b as parseUserOutput, s as sessionSchema, u as userSchema, v as verificationSchema } from '../shared/better-auth.Cc72UxUH.mjs';
|
|
5
5
|
import '../shared/better-auth.CW6D9eSx.mjs';
|
|
6
|
-
import '../shared/better-auth.
|
|
6
|
+
import '../shared/better-auth.iKoUsdFE.mjs';
|
|
7
7
|
import '../shared/better-auth.8zoxzg-F.mjs';
|
|
8
8
|
import '../shared/better-auth.tB5eU6EY.mjs';
|
|
9
9
|
import '../shared/better-auth.BUPPRXfK.mjs';
|
|
@@ -20,12 +20,13 @@ import '@better-auth/utils';
|
|
|
20
20
|
import '@better-auth/utils/hex';
|
|
21
21
|
import '@noble/hashes/utils';
|
|
22
22
|
import '../shared/better-auth.B4Qoxdgc.mjs';
|
|
23
|
-
import '../shared/better-auth.
|
|
23
|
+
import '../shared/better-auth.Cqykj82J.mjs';
|
|
24
24
|
import '../shared/better-auth.DdzSJf-n.mjs';
|
|
25
|
-
import '../shared/better-auth.
|
|
25
|
+
import '../shared/better-auth.1DR6suCQ.mjs';
|
|
26
26
|
import 'kysely';
|
|
27
|
+
import '../shared/better-auth.rSYJCd3o.mjs';
|
|
27
28
|
import '../shared/better-auth.0TC26uRi.mjs';
|
|
28
|
-
import '../shared/better-auth.
|
|
29
|
+
import '../shared/better-auth.DURsStt9.mjs';
|
|
29
30
|
|
|
30
31
|
const createFieldAttribute = (type, config) => {
|
|
31
32
|
return {
|
package/dist/index.cjs
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
const api_index = require('./api/index.cjs');
|
|
4
4
|
const defu = require('defu');
|
|
5
5
|
const password = require('./shared/better-auth.YUF6P-PB.cjs');
|
|
6
|
-
const getMigration = require('./shared/better-auth.
|
|
6
|
+
const getMigration = require('./shared/better-auth.DYoLD99C.cjs');
|
|
7
7
|
const getTables = require('./shared/better-auth.BEphVDyL.cjs');
|
|
8
8
|
require('zod');
|
|
9
|
-
require('./shared/better-auth.
|
|
9
|
+
require('./shared/better-auth.DcWKCjjf.cjs');
|
|
10
10
|
const cookies_index = require('./cookies/index.cjs');
|
|
11
11
|
const logger = require('./shared/better-auth.GpOOav9x.cjs');
|
|
12
12
|
const socialProviders_index = require('./social-providers/index.cjs');
|
|
@@ -23,10 +23,10 @@ const env = require('./shared/better-auth.DiSjtgs9.cjs');
|
|
|
23
23
|
const password$1 = require('./shared/better-auth.CDXNofOe.cjs');
|
|
24
24
|
const url = require('./shared/better-auth.C-R0J0n1.cjs');
|
|
25
25
|
const index = require('./shared/better-auth.ANpbi45u.cjs');
|
|
26
|
-
const refreshToken = require('./shared/better-auth.
|
|
26
|
+
const refreshToken = require('./shared/better-auth.Dg0siV5C.cjs');
|
|
27
27
|
const misc = require('./shared/better-auth.BLDOwz3i.cjs');
|
|
28
28
|
const state = require('./shared/better-auth.QbbyHMYf.cjs');
|
|
29
|
-
require('./shared/better-auth.
|
|
29
|
+
require('./shared/better-auth.B7cZ2juS.cjs');
|
|
30
30
|
require('@noble/hashes/scrypt');
|
|
31
31
|
require('@better-auth/utils');
|
|
32
32
|
require('@better-auth/utils/hex');
|
|
@@ -34,10 +34,11 @@ require('@noble/hashes/utils');
|
|
|
34
34
|
require('./shared/better-auth.C1hdVENX.cjs');
|
|
35
35
|
require('./shared/better-auth.D3mtHEZg.cjs');
|
|
36
36
|
require('@better-auth/utils/random');
|
|
37
|
-
require('./shared/better-auth.
|
|
37
|
+
require('./shared/better-auth.CVCo5Z2T.cjs');
|
|
38
38
|
require('kysely');
|
|
39
|
+
require('./shared/better-auth.DjryM8pE.cjs');
|
|
39
40
|
require('./shared/better-auth.CUdxApHl.cjs');
|
|
40
|
-
require('./shared/better-auth.
|
|
41
|
+
require('./shared/better-auth.BfG24BjZ.cjs');
|
|
41
42
|
require('@better-auth/utils/hmac');
|
|
42
43
|
require('@better-fetch/fetch');
|
|
43
44
|
require('./shared/better-auth.Cm29ZKNJ.cjs');
|
|
@@ -88,9 +89,12 @@ const init = async (options) => {
|
|
|
88
89
|
return provider;
|
|
89
90
|
}).filter((x) => x !== null);
|
|
90
91
|
const generateIdFunc = ({ model, size }) => {
|
|
91
|
-
if (typeof options
|
|
92
|
+
if (typeof options.advanced?.generateId === "function") {
|
|
92
93
|
return options.advanced.generateId({ model, size });
|
|
93
94
|
}
|
|
95
|
+
if (typeof options?.advanced?.database?.generateId === "function") {
|
|
96
|
+
return options.advanced.database.generateId({ model, size });
|
|
97
|
+
}
|
|
94
98
|
return id.generateId(size);
|
|
95
99
|
};
|
|
96
100
|
const ctx = {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { x as Account, g as Adapter, z as AdapterInstance, i as AdapterSchemaCreation, u as AdditionalSessionFieldsInput, v as AdditionalSessionFieldsOutput, s as AdditionalUserFieldsInput, t as AdditionalUserFieldsOutput, k as Auth, l as AuthContext, A as AuthPluginSchema, f as BetterAuthOptions, B as BetterAuthPlugin, E as FilterActions, D as FilteredAPI, G as GenericEndpointContext, H as HookEndpointContext, L as InferAPI, I as InferOptionSchema, a as InferPluginErrorCodes, w as InferPluginTypes, n as InferSession, J as InferSessionAPI, m as InferUser, T as LogHandlerParams, N as LogLevel, Q as Logger, M as Models, R as RateLimit, C as SecondaryStorage, S as Session, U as User, V as Verification, W as Where, q as WithJsDoc, r as betterAuth, X as createLogger, y as init, O as levels, Y as logger, P as shouldPublishLog } from './shared/better-auth.BcU1Kjyq.cjs';
|
|
2
2
|
export { AtomListener, BetterAuthClientPlugin, ClientOptions, InferActions, InferAdditionalFromClient, InferClientAPI, InferErrorCodes, InferPluginsFromClient, InferSessionFromClient, InferUserFromClient, IsSignal, Store } from './types/index.cjs';
|
|
3
3
|
export { H as HIDE_METADATA } from './shared/better-auth.DEHJp1rk.cjs';
|
|
4
|
-
export { g as generateState, p as parseState } from './shared/better-auth.
|
|
4
|
+
export { g as generateState, p as parseState } from './shared/better-auth.CGukGrxT.cjs';
|
|
5
5
|
export * from 'better-call';
|
|
6
6
|
export * from 'zod';
|
|
7
|
-
export { D as DeepPartial, E as Expand, H as HasRequiredKeys,
|
|
8
|
-
export { O as OAuth2Tokens, a as OAuthProvider, P as ProviderOptions } from './shared/better-auth.
|
|
7
|
+
export { D as DeepPartial, E as Expand, H as HasRequiredKeys, b as LiteralNumber, L as LiteralString, d as LiteralUnion, O as OmitId, c as PreserveJSDoc, P as Prettify, a as PrettifyDeep, R as RequiredKeysOf, S as StripEmptyObjects, U as UnionToIntersection, W as WithoutEmpty } from './shared/better-auth.CYegVoq1.cjs';
|
|
8
|
+
export { O as OAuth2Tokens, a as OAuthProvider, P as ProviderOptions } from './shared/better-auth.DTiSPWEk.cjs';
|
|
9
9
|
import 'kysely';
|
|
10
10
|
import 'better-sqlite3';
|
|
11
11
|
import '@better-fetch/fetch';
|