better-auth 1.2.8-beta.5 → 1.2.8-beta.7
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 +3 -4
- package/dist/adapters/drizzle-adapter/index.d.mts +3 -4
- package/dist/adapters/drizzle-adapter/index.d.ts +3 -4
- package/dist/adapters/index.d.cts +4 -5
- package/dist/adapters/index.d.mts +4 -5
- package/dist/adapters/index.d.ts +4 -5
- package/dist/adapters/kysely-adapter/index.cjs +1 -1
- package/dist/adapters/kysely-adapter/index.d.cts +3 -4
- package/dist/adapters/kysely-adapter/index.d.mts +3 -4
- package/dist/adapters/kysely-adapter/index.d.ts +3 -4
- package/dist/adapters/kysely-adapter/index.mjs +1 -1
- package/dist/adapters/memory-adapter/index.d.cts +3 -4
- package/dist/adapters/memory-adapter/index.d.mts +3 -4
- package/dist/adapters/memory-adapter/index.d.ts +3 -4
- package/dist/adapters/mongodb-adapter/index.d.cts +2 -3
- package/dist/adapters/mongodb-adapter/index.d.mts +2 -3
- package/dist/adapters/mongodb-adapter/index.d.ts +2 -3
- package/dist/adapters/prisma-adapter/index.d.cts +3 -4
- package/dist/adapters/prisma-adapter/index.d.mts +3 -4
- package/dist/adapters/prisma-adapter/index.d.ts +3 -4
- package/dist/adapters/test.d.cts +2 -3
- package/dist/adapters/test.d.mts +2 -3
- package/dist/adapters/test.d.ts +2 -3
- package/dist/api/index.cjs +79 -77
- package/dist/api/index.d.cts +2 -3
- package/dist/api/index.d.mts +2 -3
- package/dist/api/index.d.ts +2 -3
- package/dist/api/index.mjs +6 -5
- package/dist/client/index.d.cts +2 -3
- package/dist/client/index.d.mts +2 -3
- package/dist/client/index.d.ts +2 -3
- package/dist/client/plugins/index.d.cts +3 -4
- package/dist/client/plugins/index.d.mts +3 -4
- package/dist/client/plugins/index.d.ts +3 -4
- package/dist/client/react/index.d.cts +2 -3
- package/dist/client/react/index.d.mts +2 -3
- package/dist/client/react/index.d.ts +2 -3
- package/dist/client/solid/index.d.cts +2 -3
- package/dist/client/solid/index.d.mts +2 -3
- package/dist/client/solid/index.d.ts +2 -3
- package/dist/client/svelte/index.d.cts +2 -3
- package/dist/client/svelte/index.d.mts +2 -3
- package/dist/client/svelte/index.d.ts +2 -3
- package/dist/client/vue/index.d.cts +2 -3
- package/dist/client/vue/index.d.mts +2 -3
- package/dist/client/vue/index.d.ts +2 -3
- package/dist/cookies/index.d.cts +2 -3
- package/dist/cookies/index.d.mts +2 -3
- package/dist/cookies/index.d.ts +2 -3
- package/dist/db/index.cjs +2 -2
- package/dist/db/index.d.cts +3 -4
- package/dist/db/index.d.mts +3 -4
- package/dist/db/index.d.ts +3 -4
- package/dist/db/index.mjs +2 -2
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +3 -4
- package/dist/index.d.mts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.mjs +4 -4
- package/dist/integrations/next-js.cjs +3 -3
- package/dist/integrations/next-js.d.cts +2 -3
- package/dist/integrations/next-js.d.mts +2 -3
- package/dist/integrations/next-js.d.ts +2 -3
- package/dist/integrations/next-js.mjs +2 -2
- package/dist/integrations/node.d.cts +2 -3
- package/dist/integrations/node.d.mts +2 -3
- package/dist/integrations/node.d.ts +2 -3
- package/dist/integrations/react-start.cjs +3 -3
- package/dist/integrations/react-start.d.cts +2 -3
- package/dist/integrations/react-start.d.mts +2 -3
- package/dist/integrations/react-start.d.ts +2 -3
- package/dist/integrations/react-start.mjs +2 -2
- package/dist/integrations/svelte-kit.d.cts +2 -3
- package/dist/integrations/svelte-kit.d.mts +2 -3
- package/dist/integrations/svelte-kit.d.ts +2 -3
- package/dist/oauth2/index.d.cts +4 -5
- package/dist/oauth2/index.d.mts +4 -5
- package/dist/oauth2/index.d.ts +4 -5
- package/dist/plugins/admin/index.cjs +2 -2
- package/dist/plugins/admin/index.d.cts +4 -5
- package/dist/plugins/admin/index.d.mts +4 -5
- package/dist/plugins/admin/index.d.ts +4 -5
- package/dist/plugins/admin/index.mjs +2 -2
- package/dist/plugins/anonymous/index.cjs +7 -6
- package/dist/plugins/anonymous/index.d.cts +11 -3
- package/dist/plugins/anonymous/index.d.mts +11 -3
- package/dist/plugins/anonymous/index.d.ts +11 -3
- package/dist/plugins/anonymous/index.mjs +4 -3
- package/dist/plugins/bearer/index.cjs +3 -3
- package/dist/plugins/bearer/index.d.cts +2 -3
- package/dist/plugins/bearer/index.d.mts +2 -3
- package/dist/plugins/bearer/index.d.ts +2 -3
- package/dist/plugins/bearer/index.mjs +1 -1
- package/dist/plugins/captcha/index.d.cts +2 -3
- package/dist/plugins/captcha/index.d.mts +2 -3
- package/dist/plugins/captcha/index.d.ts +2 -3
- package/dist/plugins/custom-session/index.cjs +3 -3
- package/dist/plugins/custom-session/index.d.cts +2 -3
- package/dist/plugins/custom-session/index.d.mts +2 -3
- package/dist/plugins/custom-session/index.d.ts +2 -3
- package/dist/plugins/custom-session/index.mjs +1 -1
- package/dist/plugins/email-otp/index.cjs +12 -12
- package/dist/plugins/email-otp/index.d.cts +2 -3
- package/dist/plugins/email-otp/index.d.mts +2 -3
- package/dist/plugins/email-otp/index.d.ts +2 -3
- package/dist/plugins/email-otp/index.mjs +4 -4
- package/dist/plugins/generic-oauth/index.cjs +7 -7
- package/dist/plugins/generic-oauth/index.d.cts +2 -3
- package/dist/plugins/generic-oauth/index.d.mts +2 -3
- package/dist/plugins/generic-oauth/index.d.ts +2 -3
- package/dist/plugins/generic-oauth/index.mjs +1 -1
- package/dist/plugins/haveibeenpwned/index.cjs +1 -1
- package/dist/plugins/haveibeenpwned/index.d.cts +2 -3
- package/dist/plugins/haveibeenpwned/index.d.mts +2 -3
- package/dist/plugins/haveibeenpwned/index.d.ts +2 -3
- package/dist/plugins/haveibeenpwned/index.mjs +1 -1
- package/dist/plugins/index.cjs +21 -21
- package/dist/plugins/index.d.cts +3 -4
- package/dist/plugins/index.d.mts +3 -4
- package/dist/plugins/index.d.ts +3 -4
- package/dist/plugins/index.mjs +5 -5
- package/dist/plugins/jwt/index.cjs +5 -5
- package/dist/plugins/jwt/index.d.cts +2 -3
- package/dist/plugins/jwt/index.d.mts +2 -3
- package/dist/plugins/jwt/index.d.ts +2 -3
- package/dist/plugins/jwt/index.mjs +1 -1
- package/dist/plugins/magic-link/index.cjs +6 -6
- package/dist/plugins/magic-link/index.mjs +2 -2
- package/dist/plugins/multi-session/index.cjs +8 -8
- package/dist/plugins/multi-session/index.d.cts +2 -3
- package/dist/plugins/multi-session/index.d.mts +2 -3
- package/dist/plugins/multi-session/index.d.ts +2 -3
- package/dist/plugins/multi-session/index.mjs +1 -1
- package/dist/plugins/oauth-proxy/index.cjs +5 -5
- package/dist/plugins/oauth-proxy/index.d.cts +2 -3
- package/dist/plugins/oauth-proxy/index.d.mts +2 -3
- package/dist/plugins/oauth-proxy/index.d.ts +2 -3
- package/dist/plugins/oauth-proxy/index.mjs +1 -1
- package/dist/plugins/oidc-provider/index.cjs +13 -13
- package/dist/plugins/oidc-provider/index.d.cts +2 -3
- package/dist/plugins/oidc-provider/index.d.mts +2 -3
- package/dist/plugins/oidc-provider/index.d.ts +2 -3
- package/dist/plugins/oidc-provider/index.mjs +1 -1
- package/dist/plugins/one-tap/index.cjs +4 -4
- package/dist/plugins/one-tap/index.mjs +3 -3
- package/dist/plugins/one-time-token/index.cjs +5 -5
- package/dist/plugins/one-time-token/index.d.cts +2 -3
- package/dist/plugins/one-time-token/index.d.mts +2 -3
- package/dist/plugins/one-time-token/index.d.ts +2 -3
- package/dist/plugins/one-time-token/index.mjs +2 -2
- package/dist/plugins/open-api/index.cjs +3 -3
- package/dist/plugins/open-api/index.d.cts +2 -3
- package/dist/plugins/open-api/index.d.mts +2 -3
- package/dist/plugins/open-api/index.d.ts +2 -3
- package/dist/plugins/open-api/index.mjs +1 -1
- package/dist/plugins/organization/index.cjs +2 -2
- package/dist/plugins/organization/index.d.cts +3 -3
- package/dist/plugins/organization/index.d.mts +3 -3
- package/dist/plugins/organization/index.d.ts +3 -3
- package/dist/plugins/organization/index.mjs +2 -2
- package/dist/plugins/passkey/index.cjs +15 -15
- package/dist/plugins/passkey/index.d.cts +2 -3
- package/dist/plugins/passkey/index.d.mts +2 -3
- package/dist/plugins/passkey/index.d.ts +2 -3
- package/dist/plugins/passkey/index.mjs +2 -2
- package/dist/plugins/phone-number/index.cjs +14 -14
- package/dist/plugins/phone-number/index.d.cts +2 -3
- package/dist/plugins/phone-number/index.d.mts +2 -3
- package/dist/plugins/phone-number/index.d.ts +2 -3
- package/dist/plugins/phone-number/index.mjs +3 -3
- package/dist/plugins/sso/index.cjs +6 -6
- package/dist/plugins/sso/index.d.cts +2 -3
- package/dist/plugins/sso/index.d.mts +2 -3
- package/dist/plugins/sso/index.d.ts +2 -3
- package/dist/plugins/sso/index.mjs +1 -1
- package/dist/plugins/two-factor/index.cjs +25 -25
- package/dist/plugins/two-factor/index.d.cts +2 -3
- package/dist/plugins/two-factor/index.d.mts +2 -3
- package/dist/plugins/two-factor/index.d.ts +2 -3
- package/dist/plugins/two-factor/index.mjs +6 -6
- package/dist/plugins/username/index.cjs +10 -10
- package/dist/plugins/username/index.d.cts +2 -3
- package/dist/plugins/username/index.d.mts +2 -3
- package/dist/plugins/username/index.d.ts +2 -3
- package/dist/plugins/username/index.mjs +2 -2
- package/dist/shared/{better-auth.DEruvHER.d.ts → better-auth.07DeTSOM.d.ts} +414 -6
- package/dist/shared/{better-auth.D6n2BM2j.d.cts → better-auth.7tvwo9aU.d.cts} +1 -1
- package/dist/shared/{better-auth.C39-x5Oo.d.mts → better-auth.B-U-TEGJ.d.mts} +2 -0
- package/dist/shared/{better-auth.DcYHYdSr.mjs → better-auth.B0PuwKEL.mjs} +22 -11
- package/dist/shared/{better-auth.DZ-QPO4D.d.cts → better-auth.B7R2FDNR.d.cts} +1 -1
- package/dist/shared/{better-auth.4AOoWsWt.cjs → better-auth.BJiRPytD.cjs} +0 -9
- package/dist/shared/{better-auth.7QibuQ0I.d.cts → better-auth.BKj-j-Nn.d.cts} +2 -0
- package/dist/shared/{better-auth.BiOsDr1_.d.mts → better-auth.Bh2GYhfH.d.mts} +1 -1
- package/dist/shared/{better-auth.BI9PwjHN.cjs → better-auth.Bp3dnvEl.cjs} +41 -30
- package/dist/shared/{better-auth.DOJYkooL.d.mts → better-auth.Bt9VN7QJ.d.mts} +1 -1
- package/dist/shared/{better-auth.s9jQKDI8.d.mts → better-auth.COuudfet.d.mts} +414 -6
- package/dist/shared/{better-auth.C-pOcaA8.mjs → better-auth.Cd_A6t3-.mjs} +5 -5
- package/dist/shared/{better-auth.hVRuraA_.d.ts → better-auth.Ce5G-30g.d.ts} +1 -1
- package/dist/shared/{better-auth.Dahkdi9Z.d.cts → better-auth.Cyx8s8qX.d.cts} +1 -1
- package/dist/shared/{better-auth.DH3y_izw.d.cts → better-auth.DAnZZLm7.d.cts} +414 -6
- package/dist/shared/{better-auth.CpEzqKmn.d.ts → better-auth.DCQHJX_V.d.ts} +2 -0
- package/dist/shared/{better-auth.Da6_deha.mjs → better-auth.DKF2BM5s.mjs} +0 -9
- package/dist/shared/{better-auth.DWZaGq-n.d.ts → better-auth.F_8LXhat.d.ts} +1 -1
- package/dist/shared/{better-auth.bGngF9WG.cjs → better-auth.IF8Wj_xM.cjs} +39 -38
- package/dist/shared/{better-auth.BZRaTIwt.d.ts → better-auth.PfTmF7V-.d.ts} +1 -1
- package/dist/shared/{better-auth.B4GrHyoP.mjs → better-auth.TKj1bZrD.mjs} +3 -2
- package/dist/shared/{better-auth.C71O0JQF.mjs → better-auth.VFdNP2fm.mjs} +137 -9
- package/dist/shared/{better-auth.ogBjk2_R.cjs → better-auth.jkkUo-gB.cjs} +5 -5
- package/dist/shared/{better-auth.DWHYF1zb.d.mts → better-auth.r04L2Dbd.d.mts} +1 -1
- package/dist/shared/{better-auth.DnKeVZ5H.cjs → better-auth.r0iyl8Tx.cjs} +137 -8
- package/dist/social-providers/index.cjs +11 -0
- package/dist/social-providers/index.d.cts +1 -1
- package/dist/social-providers/index.d.mts +1 -1
- package/dist/social-providers/index.d.ts +1 -1
- package/dist/social-providers/index.mjs +11 -0
- package/dist/types/index.d.cts +3 -4
- package/dist/types/index.d.mts +3 -4
- package/dist/types/index.d.ts +3 -4
- package/package.json +15 -16
- package/dist/chunks/bun-sqlite-dialect.cjs +0 -170
- package/dist/chunks/bun-sqlite-dialect.mjs +0 -164
package/dist/api/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const betterCall = require('better-call');
|
|
4
|
-
const
|
|
4
|
+
const account = require('../shared/better-auth.r0iyl8Tx.cjs');
|
|
5
5
|
const zod = require('zod');
|
|
6
6
|
const cookies_index = require('../cookies/index.cjs');
|
|
7
7
|
const schema = require('../shared/better-auth.DcWKCjjf.cjs');
|
|
@@ -39,7 +39,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
39
39
|
|
|
40
40
|
const defu__default = /*#__PURE__*/_interopDefaultCompat(defu);
|
|
41
41
|
|
|
42
|
-
const signUpEmail = () =>
|
|
42
|
+
const signUpEmail = () => account.createAuthEndpoint(
|
|
43
43
|
"/sign-up/email",
|
|
44
44
|
{
|
|
45
45
|
method: "POST",
|
|
@@ -159,28 +159,28 @@ const signUpEmail = () => refreshToken.createAuthEndpoint(
|
|
|
159
159
|
const isValidEmail = zod.z.string().email().safeParse(email);
|
|
160
160
|
if (!isValidEmail.success) {
|
|
161
161
|
throw new betterCall.APIError("BAD_REQUEST", {
|
|
162
|
-
message:
|
|
162
|
+
message: account.BASE_ERROR_CODES.INVALID_EMAIL
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
const minPasswordLength = ctx.context.password.config.minPasswordLength;
|
|
166
166
|
if (password.length < minPasswordLength) {
|
|
167
167
|
ctx.context.logger.error("Password is too short");
|
|
168
168
|
throw new betterCall.APIError("BAD_REQUEST", {
|
|
169
|
-
message:
|
|
169
|
+
message: account.BASE_ERROR_CODES.PASSWORD_TOO_SHORT
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
const maxPasswordLength = ctx.context.password.config.maxPasswordLength;
|
|
173
173
|
if (password.length > maxPasswordLength) {
|
|
174
174
|
ctx.context.logger.error("Password is too long");
|
|
175
175
|
throw new betterCall.APIError("BAD_REQUEST", {
|
|
176
|
-
message:
|
|
176
|
+
message: account.BASE_ERROR_CODES.PASSWORD_TOO_LONG
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
const dbUser = await ctx.context.internalAdapter.findUserByEmail(email);
|
|
180
180
|
if (dbUser?.user) {
|
|
181
181
|
ctx.context.logger.info(`Sign-up attempt for existing email: ${email}`);
|
|
182
182
|
throw new betterCall.APIError("UNPROCESSABLE_ENTITY", {
|
|
183
|
-
message:
|
|
183
|
+
message: account.BASE_ERROR_CODES.USER_ALREADY_EXISTS
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
const additionalData = schema.parseUserInput(
|
|
@@ -202,7 +202,7 @@ const signUpEmail = () => refreshToken.createAuthEndpoint(
|
|
|
202
202
|
);
|
|
203
203
|
if (!createdUser) {
|
|
204
204
|
throw new betterCall.APIError("BAD_REQUEST", {
|
|
205
|
-
message:
|
|
205
|
+
message: account.BASE_ERROR_CODES.FAILED_TO_CREATE_USER
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
} catch (e) {
|
|
@@ -213,13 +213,13 @@ const signUpEmail = () => refreshToken.createAuthEndpoint(
|
|
|
213
213
|
throw e;
|
|
214
214
|
}
|
|
215
215
|
throw new betterCall.APIError("UNPROCESSABLE_ENTITY", {
|
|
216
|
-
message:
|
|
216
|
+
message: account.BASE_ERROR_CODES.FAILED_TO_CREATE_USER,
|
|
217
217
|
details: e
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
220
|
if (!createdUser) {
|
|
221
221
|
throw new betterCall.APIError("UNPROCESSABLE_ENTITY", {
|
|
222
|
-
message:
|
|
222
|
+
message: account.BASE_ERROR_CODES.FAILED_TO_CREATE_USER
|
|
223
223
|
});
|
|
224
224
|
}
|
|
225
225
|
await ctx.context.internalAdapter.linkAccount(
|
|
@@ -232,7 +232,7 @@ const signUpEmail = () => refreshToken.createAuthEndpoint(
|
|
|
232
232
|
ctx
|
|
233
233
|
);
|
|
234
234
|
if (ctx.context.options.emailVerification?.sendOnSignUp || ctx.context.options.emailAndPassword.requireEmailVerification) {
|
|
235
|
-
const token = await
|
|
235
|
+
const token = await account.createEmailVerificationToken(
|
|
236
236
|
ctx.context.secret,
|
|
237
237
|
createdUser.email,
|
|
238
238
|
void 0,
|
|
@@ -264,11 +264,11 @@ const signUpEmail = () => refreshToken.createAuthEndpoint(
|
|
|
264
264
|
}
|
|
265
265
|
const session = await ctx.context.internalAdapter.createSession(
|
|
266
266
|
createdUser.id,
|
|
267
|
-
ctx
|
|
267
|
+
ctx
|
|
268
268
|
);
|
|
269
269
|
if (!session) {
|
|
270
270
|
throw new betterCall.APIError("BAD_REQUEST", {
|
|
271
|
-
message:
|
|
271
|
+
message: account.BASE_ERROR_CODES.FAILED_TO_CREATE_SESSION
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
await cookies_index.setSessionCookie(ctx, {
|
|
@@ -422,7 +422,7 @@ async function onRequestRateLimit(req, ctx) {
|
|
|
422
422
|
if (ctx.rateLimit.customRules) {
|
|
423
423
|
const _path = Object.keys(ctx.rateLimit.customRules).find((p) => {
|
|
424
424
|
if (p.includes("*")) {
|
|
425
|
-
const isMatch =
|
|
425
|
+
const isMatch = account.wildcardMatch(p)(path);
|
|
426
426
|
return isMatch;
|
|
427
427
|
}
|
|
428
428
|
return p === path;
|
|
@@ -677,37 +677,38 @@ function getEndpoints(ctx, options) {
|
|
|
677
677
|
})
|
|
678
678
|
).filter((plugin) => plugin !== void 0).flat() || [];
|
|
679
679
|
const baseEndpoints = {
|
|
680
|
-
signInSocial:
|
|
681
|
-
callbackOAuth:
|
|
682
|
-
getSession:
|
|
683
|
-
signOut:
|
|
680
|
+
signInSocial: account.signInSocial,
|
|
681
|
+
callbackOAuth: account.callbackOAuth,
|
|
682
|
+
getSession: account.getSession(),
|
|
683
|
+
signOut: account.signOut,
|
|
684
684
|
signUpEmail: signUpEmail(),
|
|
685
|
-
signInEmail:
|
|
686
|
-
forgetPassword:
|
|
687
|
-
resetPassword:
|
|
688
|
-
verifyEmail:
|
|
689
|
-
sendVerificationEmail:
|
|
690
|
-
changeEmail:
|
|
691
|
-
changePassword:
|
|
692
|
-
setPassword:
|
|
693
|
-
updateUser:
|
|
694
|
-
deleteUser:
|
|
695
|
-
forgetPasswordCallback:
|
|
696
|
-
listSessions:
|
|
697
|
-
revokeSession:
|
|
698
|
-
revokeSessions:
|
|
699
|
-
revokeOtherSessions:
|
|
700
|
-
linkSocialAccount:
|
|
701
|
-
listUserAccounts:
|
|
702
|
-
deleteUserCallback:
|
|
703
|
-
unlinkAccount:
|
|
704
|
-
refreshToken:
|
|
685
|
+
signInEmail: account.signInEmail,
|
|
686
|
+
forgetPassword: account.forgetPassword,
|
|
687
|
+
resetPassword: account.resetPassword,
|
|
688
|
+
verifyEmail: account.verifyEmail,
|
|
689
|
+
sendVerificationEmail: account.sendVerificationEmail,
|
|
690
|
+
changeEmail: account.changeEmail,
|
|
691
|
+
changePassword: account.changePassword,
|
|
692
|
+
setPassword: account.setPassword,
|
|
693
|
+
updateUser: account.updateUser(),
|
|
694
|
+
deleteUser: account.deleteUser,
|
|
695
|
+
forgetPasswordCallback: account.forgetPasswordCallback,
|
|
696
|
+
listSessions: account.listSessions(),
|
|
697
|
+
revokeSession: account.revokeSession,
|
|
698
|
+
revokeSessions: account.revokeSessions,
|
|
699
|
+
revokeOtherSessions: account.revokeOtherSessions,
|
|
700
|
+
linkSocialAccount: account.linkSocialAccount,
|
|
701
|
+
listUserAccounts: account.listUserAccounts,
|
|
702
|
+
deleteUserCallback: account.deleteUserCallback,
|
|
703
|
+
unlinkAccount: account.unlinkAccount,
|
|
704
|
+
refreshToken: account.refreshToken,
|
|
705
|
+
getAccessToken: account.getAccessToken
|
|
705
706
|
};
|
|
706
707
|
const endpoints = {
|
|
707
708
|
...baseEndpoints,
|
|
708
709
|
...pluginEndpoints,
|
|
709
|
-
ok:
|
|
710
|
-
error:
|
|
710
|
+
ok: account.ok,
|
|
711
|
+
error: account.error
|
|
711
712
|
};
|
|
712
713
|
const api = toAuthEndpoints(endpoints, ctx);
|
|
713
714
|
return {
|
|
@@ -727,7 +728,7 @@ const router = (ctx, options) => {
|
|
|
727
728
|
routerMiddleware: [
|
|
728
729
|
{
|
|
729
730
|
path: "/**",
|
|
730
|
-
middleware:
|
|
731
|
+
middleware: account.originCheckMiddleware
|
|
731
732
|
},
|
|
732
733
|
...middlewares
|
|
733
734
|
],
|
|
@@ -795,43 +796,44 @@ const router = (ctx, options) => {
|
|
|
795
796
|
};
|
|
796
797
|
|
|
797
798
|
exports.APIError = betterCall.APIError;
|
|
798
|
-
exports.callbackOAuth =
|
|
799
|
-
exports.changeEmail =
|
|
800
|
-
exports.changePassword =
|
|
801
|
-
exports.createAuthEndpoint =
|
|
802
|
-
exports.createAuthMiddleware =
|
|
803
|
-
exports.createEmailVerificationToken =
|
|
804
|
-
exports.deleteUser =
|
|
805
|
-
exports.deleteUserCallback =
|
|
806
|
-
exports.error =
|
|
807
|
-
exports.forgetPassword =
|
|
808
|
-
exports.forgetPasswordCallback =
|
|
809
|
-
exports.freshSessionMiddleware =
|
|
810
|
-
exports.
|
|
811
|
-
exports.
|
|
812
|
-
exports.
|
|
813
|
-
exports.
|
|
814
|
-
exports.
|
|
815
|
-
exports.
|
|
816
|
-
exports.
|
|
817
|
-
exports.
|
|
818
|
-
exports.
|
|
819
|
-
exports.
|
|
820
|
-
exports.
|
|
821
|
-
exports.
|
|
822
|
-
exports.
|
|
823
|
-
exports.
|
|
824
|
-
exports.
|
|
825
|
-
exports.
|
|
826
|
-
exports.
|
|
827
|
-
exports.
|
|
828
|
-
exports.
|
|
829
|
-
exports.
|
|
830
|
-
exports.
|
|
831
|
-
exports.
|
|
832
|
-
exports.
|
|
833
|
-
exports.
|
|
834
|
-
exports.
|
|
799
|
+
exports.callbackOAuth = account.callbackOAuth;
|
|
800
|
+
exports.changeEmail = account.changeEmail;
|
|
801
|
+
exports.changePassword = account.changePassword;
|
|
802
|
+
exports.createAuthEndpoint = account.createAuthEndpoint;
|
|
803
|
+
exports.createAuthMiddleware = account.createAuthMiddleware;
|
|
804
|
+
exports.createEmailVerificationToken = account.createEmailVerificationToken;
|
|
805
|
+
exports.deleteUser = account.deleteUser;
|
|
806
|
+
exports.deleteUserCallback = account.deleteUserCallback;
|
|
807
|
+
exports.error = account.error;
|
|
808
|
+
exports.forgetPassword = account.forgetPassword;
|
|
809
|
+
exports.forgetPasswordCallback = account.forgetPasswordCallback;
|
|
810
|
+
exports.freshSessionMiddleware = account.freshSessionMiddleware;
|
|
811
|
+
exports.getAccessToken = account.getAccessToken;
|
|
812
|
+
exports.getSession = account.getSession;
|
|
813
|
+
exports.getSessionFromCtx = account.getSessionFromCtx;
|
|
814
|
+
exports.linkSocialAccount = account.linkSocialAccount;
|
|
815
|
+
exports.listSessions = account.listSessions;
|
|
816
|
+
exports.listUserAccounts = account.listUserAccounts;
|
|
817
|
+
exports.ok = account.ok;
|
|
818
|
+
exports.optionsMiddleware = account.optionsMiddleware;
|
|
819
|
+
exports.originCheck = account.originCheck;
|
|
820
|
+
exports.originCheckMiddleware = account.originCheckMiddleware;
|
|
821
|
+
exports.refreshToken = account.refreshToken;
|
|
822
|
+
exports.requestOnlySessionMiddleware = account.requestOnlySessionMiddleware;
|
|
823
|
+
exports.resetPassword = account.resetPassword;
|
|
824
|
+
exports.revokeOtherSessions = account.revokeOtherSessions;
|
|
825
|
+
exports.revokeSession = account.revokeSession;
|
|
826
|
+
exports.revokeSessions = account.revokeSessions;
|
|
827
|
+
exports.sendVerificationEmail = account.sendVerificationEmail;
|
|
828
|
+
exports.sendVerificationEmailFn = account.sendVerificationEmailFn;
|
|
829
|
+
exports.sessionMiddleware = account.sessionMiddleware;
|
|
830
|
+
exports.setPassword = account.setPassword;
|
|
831
|
+
exports.signInEmail = account.signInEmail;
|
|
832
|
+
exports.signInSocial = account.signInSocial;
|
|
833
|
+
exports.signOut = account.signOut;
|
|
834
|
+
exports.unlinkAccount = account.unlinkAccount;
|
|
835
|
+
exports.updateUser = account.updateUser;
|
|
836
|
+
exports.verifyEmail = account.verifyEmail;
|
|
835
837
|
exports.getEndpoints = getEndpoints;
|
|
836
838
|
exports.router = router;
|
|
837
839
|
exports.signUpEmail = signUpEmail;
|
package/dist/api/index.d.cts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import '../shared/better-auth.CYegVoq1.cjs';
|
|
2
2
|
export { APIError } from 'better-call';
|
|
3
|
-
export { d as AuthEndpoint, e as AuthMiddleware, aF as callbackOAuth, b0 as changeEmail, aY as changePassword, b as createAuthEndpoint, c as createAuthMiddleware, aT as createEmailVerificationToken, a_ as deleteUser, a$ as deleteUserCallback, b1 as error, aQ as forgetPassword, aR as forgetPasswordCallback, aK as freshSessionMiddleware, aB as getEndpoints, aG as getSession, aH as getSessionFromCtx, b5 as linkSocialAccount, aL as listSessions, b4 as listUserAccounts, b2 as ok, o as optionsMiddleware,
|
|
3
|
+
export { d as AuthEndpoint, e as AuthMiddleware, aF as callbackOAuth, b0 as changeEmail, aY as changePassword, b as createAuthEndpoint, c as createAuthMiddleware, aT as createEmailVerificationToken, a_ as deleteUser, a$ as deleteUserCallback, b1 as error, aQ as forgetPassword, aR as forgetPasswordCallback, aK as freshSessionMiddleware, b7 as getAccessToken, aB as getEndpoints, aG as getSession, aH as getSessionFromCtx, b5 as linkSocialAccount, aL as listSessions, b4 as listUserAccounts, b2 as ok, o as optionsMiddleware, ba as originCheck, b9 as originCheckMiddleware, b8 as refreshToken, aJ as requestOnlySessionMiddleware, aS as resetPassword, aO as revokeOtherSessions, aM as revokeSession, aN as revokeSessions, aC as router, aV as sendVerificationEmail, aU as sendVerificationEmailFn, aI as sessionMiddleware, aZ as setPassword, aE as signInEmail, aD as signInSocial, aP as signOut, b3 as signUpEmail, b6 as unlinkAccount, aX as updateUser, aW as verifyEmail } from '../shared/better-auth.DAnZZLm7.cjs';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import '../shared/better-auth.
|
|
5
|
+
import '../shared/better-auth.BKj-j-Nn.cjs';
|
|
6
6
|
import 'kysely';
|
|
7
7
|
import 'better-sqlite3';
|
|
8
|
-
import 'bun:sqlite';
|
|
9
8
|
import 'jose';
|
package/dist/api/index.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import '../shared/better-auth.CYegVoq1.mjs';
|
|
2
2
|
export { APIError } from 'better-call';
|
|
3
|
-
export { d as AuthEndpoint, e as AuthMiddleware, aF as callbackOAuth, b0 as changeEmail, aY as changePassword, b as createAuthEndpoint, c as createAuthMiddleware, aT as createEmailVerificationToken, a_ as deleteUser, a$ as deleteUserCallback, b1 as error, aQ as forgetPassword, aR as forgetPasswordCallback, aK as freshSessionMiddleware, aB as getEndpoints, aG as getSession, aH as getSessionFromCtx, b5 as linkSocialAccount, aL as listSessions, b4 as listUserAccounts, b2 as ok, o as optionsMiddleware,
|
|
3
|
+
export { d as AuthEndpoint, e as AuthMiddleware, aF as callbackOAuth, b0 as changeEmail, aY as changePassword, b as createAuthEndpoint, c as createAuthMiddleware, aT as createEmailVerificationToken, a_ as deleteUser, a$ as deleteUserCallback, b1 as error, aQ as forgetPassword, aR as forgetPasswordCallback, aK as freshSessionMiddleware, b7 as getAccessToken, aB as getEndpoints, aG as getSession, aH as getSessionFromCtx, b5 as linkSocialAccount, aL as listSessions, b4 as listUserAccounts, b2 as ok, o as optionsMiddleware, ba as originCheck, b9 as originCheckMiddleware, b8 as refreshToken, aJ as requestOnlySessionMiddleware, aS as resetPassword, aO as revokeOtherSessions, aM as revokeSession, aN as revokeSessions, aC as router, aV as sendVerificationEmail, aU as sendVerificationEmailFn, aI as sessionMiddleware, aZ as setPassword, aE as signInEmail, aD as signInSocial, aP as signOut, b3 as signUpEmail, b6 as unlinkAccount, aX as updateUser, aW as verifyEmail } from '../shared/better-auth.COuudfet.mjs';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import '../shared/better-auth.
|
|
5
|
+
import '../shared/better-auth.B-U-TEGJ.mjs';
|
|
6
6
|
import 'kysely';
|
|
7
7
|
import 'better-sqlite3';
|
|
8
|
-
import 'bun:sqlite';
|
|
9
8
|
import 'jose';
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import '../shared/better-auth.CYegVoq1.js';
|
|
2
2
|
export { APIError } from 'better-call';
|
|
3
|
-
export { d as AuthEndpoint, e as AuthMiddleware, aF as callbackOAuth, b0 as changeEmail, aY as changePassword, b as createAuthEndpoint, c as createAuthMiddleware, aT as createEmailVerificationToken, a_ as deleteUser, a$ as deleteUserCallback, b1 as error, aQ as forgetPassword, aR as forgetPasswordCallback, aK as freshSessionMiddleware, aB as getEndpoints, aG as getSession, aH as getSessionFromCtx, b5 as linkSocialAccount, aL as listSessions, b4 as listUserAccounts, b2 as ok, o as optionsMiddleware,
|
|
3
|
+
export { d as AuthEndpoint, e as AuthMiddleware, aF as callbackOAuth, b0 as changeEmail, aY as changePassword, b as createAuthEndpoint, c as createAuthMiddleware, aT as createEmailVerificationToken, a_ as deleteUser, a$ as deleteUserCallback, b1 as error, aQ as forgetPassword, aR as forgetPasswordCallback, aK as freshSessionMiddleware, b7 as getAccessToken, aB as getEndpoints, aG as getSession, aH as getSessionFromCtx, b5 as linkSocialAccount, aL as listSessions, b4 as listUserAccounts, b2 as ok, o as optionsMiddleware, ba as originCheck, b9 as originCheckMiddleware, b8 as refreshToken, aJ as requestOnlySessionMiddleware, aS as resetPassword, aO as revokeOtherSessions, aM as revokeSession, aN as revokeSessions, aC as router, aV as sendVerificationEmail, aU as sendVerificationEmailFn, aI as sessionMiddleware, aZ as setPassword, aE as signInEmail, aD as signInSocial, aP as signOut, b3 as signUpEmail, b6 as unlinkAccount, aX as updateUser, aW as verifyEmail } from '../shared/better-auth.07DeTSOM.js';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import '../shared/better-auth.
|
|
5
|
+
import '../shared/better-auth.DCQHJX_V.js';
|
|
6
6
|
import 'kysely';
|
|
7
7
|
import 'better-sqlite3';
|
|
8
|
-
import 'bun:sqlite';
|
|
9
8
|
import 'jose';
|
package/dist/api/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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, e as createEmailVerificationToken, w as wildcardMatch, l as listSessions, u as updateUser, b as getSession, i as originCheckMiddleware, j as error, k as ok, r as refreshToken,
|
|
4
|
-
export { c as createAuthMiddleware, f as freshSessionMiddleware, g as getSessionFromCtx,
|
|
3
|
+
import { a as createAuthEndpoint, B as BASE_ERROR_CODES, e as createEmailVerificationToken, w as wildcardMatch, l as listSessions, u as updateUser, b as getSession, i as originCheckMiddleware, j as error, k as ok, m as getAccessToken, r as refreshToken, n as unlinkAccount, p as deleteUserCallback, q as listUserAccounts, t as linkSocialAccount, v as revokeOtherSessions, x as revokeSessions, y as revokeSession, z as forgetPasswordCallback, A as deleteUser, C as setPassword, D as changePassword, E as changeEmail, F as sendVerificationEmail, G as verifyEmail, I as resetPassword, J as forgetPassword, K as signInEmail, L as signOut, M as callbackOAuth, N as signInSocial } from '../shared/better-auth.VFdNP2fm.mjs';
|
|
4
|
+
export { c as createAuthMiddleware, f as freshSessionMiddleware, g as getSessionFromCtx, P as optionsMiddleware, o as originCheck, O as requestOnlySessionMiddleware, d as sendVerificationEmailFn, s as sessionMiddleware } from '../shared/better-auth.VFdNP2fm.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.Cc72UxUH.mjs';
|
|
@@ -260,7 +260,7 @@ const signUpEmail = () => createAuthEndpoint(
|
|
|
260
260
|
}
|
|
261
261
|
const session = await ctx.context.internalAdapter.createSession(
|
|
262
262
|
createdUser.id,
|
|
263
|
-
ctx
|
|
263
|
+
ctx
|
|
264
264
|
);
|
|
265
265
|
if (!session) {
|
|
266
266
|
throw new APIError("BAD_REQUEST", {
|
|
@@ -697,7 +697,8 @@ function getEndpoints(ctx, options) {
|
|
|
697
697
|
listUserAccounts,
|
|
698
698
|
deleteUserCallback,
|
|
699
699
|
unlinkAccount,
|
|
700
|
-
refreshToken
|
|
700
|
+
refreshToken,
|
|
701
|
+
getAccessToken
|
|
701
702
|
};
|
|
702
703
|
const endpoints = {
|
|
703
704
|
...baseEndpoints,
|
|
@@ -790,4 +791,4 @@ const router = (ctx, options) => {
|
|
|
790
791
|
});
|
|
791
792
|
};
|
|
792
793
|
|
|
793
|
-
export { callbackOAuth, changeEmail, changePassword, createAuthEndpoint, createEmailVerificationToken, deleteUser, deleteUserCallback, error, forgetPassword, forgetPasswordCallback, getEndpoints, getSession, linkSocialAccount, listSessions, listUserAccounts, ok, originCheckMiddleware, refreshToken, resetPassword, revokeOtherSessions, revokeSession, revokeSessions, router, sendVerificationEmail, setPassword, signInEmail, signInSocial, signOut, signUpEmail, unlinkAccount, updateUser, verifyEmail };
|
|
794
|
+
export { callbackOAuth, changeEmail, changePassword, createAuthEndpoint, createEmailVerificationToken, deleteUser, deleteUserCallback, error, forgetPassword, forgetPasswordCallback, getAccessToken, getEndpoints, getSession, linkSocialAccount, listSessions, listUserAccounts, ok, originCheckMiddleware, refreshToken, resetPassword, revokeOtherSessions, revokeSession, revokeSessions, router, sendVerificationEmail, setPassword, signInEmail, signInSocial, signOut, signUpEmail, unlinkAccount, updateUser, verifyEmail };
|
package/dist/client/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.
|
|
1
|
+
import { j as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.DAnZZLm7.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';
|
|
@@ -9,12 +9,11 @@ import { Atom, PreinitializedWritableAtom } from 'nanostores';
|
|
|
9
9
|
export * from 'nanostores';
|
|
10
10
|
import { U as UnionToIntersection, a as PrettifyDeep } from '../shared/better-auth.CYegVoq1.cjs';
|
|
11
11
|
import 'zod';
|
|
12
|
-
import '../shared/better-auth.
|
|
12
|
+
import '../shared/better-auth.BKj-j-Nn.cjs';
|
|
13
13
|
import 'jose';
|
|
14
14
|
import 'kysely';
|
|
15
15
|
import 'better-call';
|
|
16
16
|
import 'better-sqlite3';
|
|
17
|
-
import 'bun:sqlite';
|
|
18
17
|
|
|
19
18
|
type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
|
|
20
19
|
[key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: Atoms[key];
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.
|
|
1
|
+
import { j as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.COuudfet.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';
|
|
@@ -9,12 +9,11 @@ import { Atom, PreinitializedWritableAtom } from 'nanostores';
|
|
|
9
9
|
export * from 'nanostores';
|
|
10
10
|
import { U as UnionToIntersection, a as PrettifyDeep } from '../shared/better-auth.CYegVoq1.mjs';
|
|
11
11
|
import 'zod';
|
|
12
|
-
import '../shared/better-auth.
|
|
12
|
+
import '../shared/better-auth.B-U-TEGJ.mjs';
|
|
13
13
|
import 'jose';
|
|
14
14
|
import 'kysely';
|
|
15
15
|
import 'better-call';
|
|
16
16
|
import 'better-sqlite3';
|
|
17
|
-
import 'bun:sqlite';
|
|
18
17
|
|
|
19
18
|
type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
|
|
20
19
|
[key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: Atoms[key];
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.
|
|
1
|
+
import { j as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.07DeTSOM.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';
|
|
@@ -9,12 +9,11 @@ import { Atom, PreinitializedWritableAtom } from 'nanostores';
|
|
|
9
9
|
export * from 'nanostores';
|
|
10
10
|
import { U as UnionToIntersection, a as PrettifyDeep } from '../shared/better-auth.CYegVoq1.js';
|
|
11
11
|
import 'zod';
|
|
12
|
-
import '../shared/better-auth.
|
|
12
|
+
import '../shared/better-auth.DCQHJX_V.js';
|
|
13
13
|
import 'jose';
|
|
14
14
|
import 'kysely';
|
|
15
15
|
import 'better-call';
|
|
16
16
|
import 'better-sqlite3';
|
|
17
|
-
import 'bun:sqlite';
|
|
18
17
|
|
|
19
18
|
type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
|
|
20
19
|
[key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: Atoms[key];
|
|
@@ -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 { F as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.
|
|
14
|
+
import { F as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.DAnZZLm7.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,17 +20,16 @@ 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.B7R2FDNR.cjs';
|
|
24
24
|
import { oneTimeToken } from '../../plugins/one-time-token/index.cjs';
|
|
25
25
|
export * from '@simplewebauthn/server';
|
|
26
26
|
import 'zod';
|
|
27
27
|
import 'better-call';
|
|
28
28
|
import '../../plugins/organization/access/index.cjs';
|
|
29
|
-
import '../../shared/better-auth.
|
|
29
|
+
import '../../shared/better-auth.BKj-j-Nn.cjs';
|
|
30
30
|
import 'jose';
|
|
31
31
|
import 'kysely';
|
|
32
32
|
import 'better-sqlite3';
|
|
33
|
-
import 'bun:sqlite';
|
|
34
33
|
|
|
35
34
|
interface OrganizationClientOptions {
|
|
36
35
|
ac?: AccessControl;
|
|
@@ -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 { F as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.
|
|
14
|
+
import { F as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.COuudfet.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,17 +20,16 @@ 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.r04L2Dbd.mjs';
|
|
24
24
|
import { oneTimeToken } from '../../plugins/one-time-token/index.mjs';
|
|
25
25
|
export * from '@simplewebauthn/server';
|
|
26
26
|
import 'zod';
|
|
27
27
|
import 'better-call';
|
|
28
28
|
import '../../plugins/organization/access/index.mjs';
|
|
29
|
-
import '../../shared/better-auth.
|
|
29
|
+
import '../../shared/better-auth.B-U-TEGJ.mjs';
|
|
30
30
|
import 'jose';
|
|
31
31
|
import 'kysely';
|
|
32
32
|
import 'better-sqlite3';
|
|
33
|
-
import 'bun:sqlite';
|
|
34
33
|
|
|
35
34
|
interface OrganizationClientOptions {
|
|
36
35
|
ac?: AccessControl;
|
|
@@ -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 { F as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.
|
|
14
|
+
import { F as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.07DeTSOM.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,17 +20,16 @@ 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.F_8LXhat.js';
|
|
24
24
|
import { oneTimeToken } from '../../plugins/one-time-token/index.js';
|
|
25
25
|
export * from '@simplewebauthn/server';
|
|
26
26
|
import 'zod';
|
|
27
27
|
import 'better-call';
|
|
28
28
|
import '../../plugins/organization/access/index.js';
|
|
29
|
-
import '../../shared/better-auth.
|
|
29
|
+
import '../../shared/better-auth.DCQHJX_V.js';
|
|
30
30
|
import 'jose';
|
|
31
31
|
import 'kysely';
|
|
32
32
|
import 'better-sqlite3';
|
|
33
|
-
import 'bun:sqlite';
|
|
34
33
|
|
|
35
34
|
interface OrganizationClientOptions {
|
|
36
35
|
ac?: AccessControl;
|
|
@@ -7,14 +7,13 @@ export * from '@better-fetch/fetch';
|
|
|
7
7
|
import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.cjs';
|
|
8
8
|
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.cjs';
|
|
9
9
|
import { DependencyList } from 'react';
|
|
10
|
-
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
10
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.DAnZZLm7.cjs';
|
|
11
11
|
import 'better-call';
|
|
12
12
|
import 'zod';
|
|
13
|
-
import '../../shared/better-auth.
|
|
13
|
+
import '../../shared/better-auth.BKj-j-Nn.cjs';
|
|
14
14
|
import 'jose';
|
|
15
15
|
import 'kysely';
|
|
16
16
|
import 'better-sqlite3';
|
|
17
|
-
import 'bun:sqlite';
|
|
18
17
|
|
|
19
18
|
type StoreKeys<T> = T extends {
|
|
20
19
|
setKey: (k: infer K, v: any) => unknown;
|
|
@@ -7,14 +7,13 @@ export * from '@better-fetch/fetch';
|
|
|
7
7
|
import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.mjs';
|
|
8
8
|
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.mjs';
|
|
9
9
|
import { DependencyList } from 'react';
|
|
10
|
-
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
10
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.COuudfet.mjs';
|
|
11
11
|
import 'better-call';
|
|
12
12
|
import 'zod';
|
|
13
|
-
import '../../shared/better-auth.
|
|
13
|
+
import '../../shared/better-auth.B-U-TEGJ.mjs';
|
|
14
14
|
import 'jose';
|
|
15
15
|
import 'kysely';
|
|
16
16
|
import 'better-sqlite3';
|
|
17
|
-
import 'bun:sqlite';
|
|
18
17
|
|
|
19
18
|
type StoreKeys<T> = T extends {
|
|
20
19
|
setKey: (k: infer K, v: any) => unknown;
|
|
@@ -7,14 +7,13 @@ export * from '@better-fetch/fetch';
|
|
|
7
7
|
import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.js';
|
|
8
8
|
import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.js';
|
|
9
9
|
import { DependencyList } from 'react';
|
|
10
|
-
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
10
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.07DeTSOM.js';
|
|
11
11
|
import 'better-call';
|
|
12
12
|
import 'zod';
|
|
13
|
-
import '../../shared/better-auth.
|
|
13
|
+
import '../../shared/better-auth.DCQHJX_V.js';
|
|
14
14
|
import 'jose';
|
|
15
15
|
import 'kysely';
|
|
16
16
|
import 'better-sqlite3';
|
|
17
|
-
import 'bun:sqlite';
|
|
18
17
|
|
|
19
18
|
type StoreKeys<T> = T extends {
|
|
20
19
|
setKey: (k: infer K, v: any) => unknown;
|
|
@@ -4,15 +4,14 @@ 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, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.cjs';
|
|
7
|
-
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
7
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.DAnZZLm7.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.BKj-j-Nn.cjs';
|
|
12
12
|
import 'jose';
|
|
13
13
|
import 'kysely';
|
|
14
14
|
import 'better-sqlite3';
|
|
15
|
-
import 'bun:sqlite';
|
|
16
15
|
|
|
17
16
|
type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
|
|
18
17
|
[key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => Accessor<ReturnType<Atoms[key]["get"]>>;
|
|
@@ -4,15 +4,14 @@ 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, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.mjs';
|
|
7
|
-
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
7
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.COuudfet.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.B-U-TEGJ.mjs';
|
|
12
12
|
import 'jose';
|
|
13
13
|
import 'kysely';
|
|
14
14
|
import 'better-sqlite3';
|
|
15
|
-
import 'bun:sqlite';
|
|
16
15
|
|
|
17
16
|
type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
|
|
18
17
|
[key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => Accessor<ReturnType<Atoms[key]["get"]>>;
|
|
@@ -4,15 +4,14 @@ 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, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.js';
|
|
7
|
-
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
7
|
+
import { j as BASE_ERROR_CODES } from '../../shared/better-auth.07DeTSOM.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.DCQHJX_V.js';
|
|
12
12
|
import 'jose';
|
|
13
13
|
import 'kysely';
|
|
14
14
|
import 'better-sqlite3';
|
|
15
|
-
import 'bun:sqlite';
|
|
16
15
|
|
|
17
16
|
type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
|
|
18
17
|
[key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => Accessor<ReturnType<Atoms[key]["get"]>>;
|