better-auth 1.2.3 → 1.2.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.cjs +5 -3
- package/dist/api/index.mjs +6 -4
- package/dist/client/plugins/index.d.cts +1 -1
- package/dist/client/plugins/index.d.mts +1 -1
- package/dist/client/plugins/index.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/integrations/next-js.cjs +3 -3
- package/dist/integrations/next-js.mjs +3 -3
- package/dist/plugins/admin/index.cjs +2 -2
- package/dist/plugins/admin/index.mjs +2 -2
- package/dist/plugins/anonymous/index.cjs +1 -1
- package/dist/plugins/anonymous/index.mjs +1 -1
- package/dist/plugins/bearer/index.cjs +1 -1
- package/dist/plugins/bearer/index.mjs +1 -1
- package/dist/plugins/custom-session/index.cjs +1 -1
- package/dist/plugins/custom-session/index.mjs +1 -1
- package/dist/plugins/email-otp/index.cjs +1 -1
- package/dist/plugins/email-otp/index.mjs +1 -1
- package/dist/plugins/generic-oauth/index.cjs +1 -1
- package/dist/plugins/generic-oauth/index.mjs +1 -1
- package/dist/plugins/index.cjs +5 -5
- package/dist/plugins/index.d.cts +1 -1
- package/dist/plugins/index.d.mts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.mjs +6 -6
- package/dist/plugins/jwt/index.cjs +5 -11
- package/dist/plugins/jwt/index.mjs +5 -11
- package/dist/plugins/magic-link/index.cjs +1 -1
- package/dist/plugins/magic-link/index.mjs +1 -1
- package/dist/plugins/multi-session/index.cjs +1 -1
- package/dist/plugins/multi-session/index.mjs +1 -1
- package/dist/plugins/oauth-proxy/index.cjs +1 -1
- package/dist/plugins/oauth-proxy/index.mjs +1 -1
- package/dist/plugins/oidc-provider/index.cjs +1 -1
- package/dist/plugins/oidc-provider/index.mjs +1 -1
- package/dist/plugins/one-tap/index.cjs +1 -1
- package/dist/plugins/one-tap/index.mjs +1 -1
- package/dist/plugins/open-api/index.cjs +1 -1
- package/dist/plugins/open-api/index.mjs +1 -1
- package/dist/plugins/organization/index.cjs +3 -3
- package/dist/plugins/organization/index.d.cts +1 -1
- package/dist/plugins/organization/index.d.mts +1 -1
- package/dist/plugins/organization/index.d.ts +1 -1
- package/dist/plugins/organization/index.mjs +3 -3
- package/dist/plugins/passkey/index.cjs +1 -1
- package/dist/plugins/passkey/index.mjs +1 -1
- package/dist/plugins/phone-number/index.cjs +1 -1
- package/dist/plugins/phone-number/index.mjs +1 -1
- package/dist/plugins/sso/index.cjs +1 -1
- package/dist/plugins/sso/index.mjs +1 -1
- package/dist/plugins/two-factor/index.cjs +2 -2
- package/dist/plugins/two-factor/index.mjs +2 -2
- package/dist/plugins/username/index.cjs +1 -1
- package/dist/plugins/username/index.mjs +1 -1
- package/dist/shared/{better-auth.Dxn5Xplu.d.ts → better-auth.977UjO4P.d.ts} +1 -1
- package/dist/shared/{better-auth.0i5RUFK_.d.cts → better-auth.BLtLzuLI.d.cts} +1 -1
- package/dist/shared/{better-auth.BI_ldOv7.mjs → better-auth.BMQCpZqn.mjs} +2 -2
- package/dist/shared/{better-auth.BzKRBwSF.cjs → better-auth.B_LJ7ih7.cjs} +7 -0
- package/dist/shared/{better-auth.BvJDkY_b.cjs → better-auth.Cc21WQki.cjs} +1 -1
- package/dist/shared/{better-auth.CMz4USTt.cjs → better-auth.Cju5zdPQ.cjs} +1 -1
- package/dist/shared/{better-auth.CwDUoRLB.cjs → better-auth.Cr4LHzLR.cjs} +2 -2
- package/dist/shared/{better-auth.DvFTih7n.d.mts → better-auth.D4ignKqt.d.mts} +1 -1
- package/dist/shared/{better-auth.CqfKuHli.mjs → better-auth.Dagzk3UO.mjs} +1 -1
- package/dist/shared/{better-auth.DXbPkpEx.cjs → better-auth.Dy6opOJA.cjs} +1 -1
- package/dist/shared/{better-auth.npe3WWSD.mjs → better-auth.jsVM_L7s.mjs} +7 -0
- package/dist/shared/{better-auth.Bd1H94Nk.mjs → better-auth.mLf3tSlS.mjs} +1 -1
- package/dist/shared/{better-auth.K251u4eV.mjs → better-auth.pf5SQkJM.mjs} +1 -1
- package/package.json +1 -1
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 account = require('../shared/better-auth.
|
|
4
|
+
const account = require('../shared/better-auth.B_LJ7ih7.cjs');
|
|
5
5
|
const zod = require('zod');
|
|
6
6
|
const cookies_index = require('../cookies/index.cjs');
|
|
7
7
|
const schema = require('../shared/better-auth.CHyZMcYK.cjs');
|
|
@@ -354,8 +354,10 @@ async function onRequestRateLimit(req, ctx) {
|
|
|
354
354
|
if (!ctx.rateLimit.enabled) {
|
|
355
355
|
return;
|
|
356
356
|
}
|
|
357
|
-
const
|
|
358
|
-
|
|
357
|
+
const path = new URL(req.url).pathname.replace(
|
|
358
|
+
ctx.options.basePath || "/api/auth",
|
|
359
|
+
""
|
|
360
|
+
);
|
|
359
361
|
let window = ctx.rateLimit.window;
|
|
360
362
|
let max = ctx.rateLimit.max;
|
|
361
363
|
const key = getRequestIp.getIp(req, ctx.options) + path;
|
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, d as createEmailVerificationToken, w as wildcardMatch, l as listSessions, u as updateUser, e as getSession, i as originCheckMiddleware, j as error, k as ok, m as unlinkAccount, n as deleteUserCallback, p as listUserAccounts, q as linkSocialAccount, r as revokeOtherSessions, t as revokeSessions, v as revokeSession, x as forgetPasswordCallback, y as deleteUser, z as setPassword, A as changePassword, C as changeEmail, D as sendVerificationEmail, E as verifyEmail, F as resetPassword, G as forgetPassword, I as signInEmail, J as signOut, K as callbackOAuth, L as signInSocial } from '../shared/better-auth.
|
|
4
|
-
export { c as createAuthMiddleware, f as freshSessionMiddleware, g as getSessionFromCtx, N as optionsMiddleware, o as originCheck, M as requestOnlySessionMiddleware, b as sendVerificationEmailFn, s as sessionMiddleware } from '../shared/better-auth.
|
|
3
|
+
import { a as createAuthEndpoint, B as BASE_ERROR_CODES, d as createEmailVerificationToken, w as wildcardMatch, l as listSessions, u as updateUser, e as getSession, i as originCheckMiddleware, j as error, k as ok, m as unlinkAccount, n as deleteUserCallback, p as listUserAccounts, q as linkSocialAccount, r as revokeOtherSessions, t as revokeSessions, v as revokeSession, x as forgetPasswordCallback, y as deleteUser, z as setPassword, A as changePassword, C as changeEmail, D as sendVerificationEmail, E as verifyEmail, F as resetPassword, G as forgetPassword, I as signInEmail, J as signOut, K as callbackOAuth, L as signInSocial } from '../shared/better-auth.jsVM_L7s.mjs';
|
|
4
|
+
export { c as createAuthMiddleware, f as freshSessionMiddleware, g as getSessionFromCtx, N as optionsMiddleware, o as originCheck, M as requestOnlySessionMiddleware, b as sendVerificationEmailFn, s as sessionMiddleware } from '../shared/better-auth.jsVM_L7s.mjs';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { setSessionCookie } from '../cookies/index.mjs';
|
|
7
7
|
import { f as parseUserInput } from '../shared/better-auth.C24Bzw4w.mjs';
|
|
@@ -350,8 +350,10 @@ async function onRequestRateLimit(req, ctx) {
|
|
|
350
350
|
if (!ctx.rateLimit.enabled) {
|
|
351
351
|
return;
|
|
352
352
|
}
|
|
353
|
-
const
|
|
354
|
-
|
|
353
|
+
const path = new URL(req.url).pathname.replace(
|
|
354
|
+
ctx.options.basePath || "/api/auth",
|
|
355
|
+
""
|
|
356
|
+
);
|
|
355
357
|
let window = ctx.rateLimit.window;
|
|
356
358
|
let max = ctx.rateLimit.max;
|
|
357
359
|
const key = getIp(req, ctx.options) + path;
|
|
@@ -3,7 +3,7 @@ import { atom } from 'nanostores';
|
|
|
3
3
|
import { AccessControl, Role, Statements, Subset, AuthortizeResponse } from '../../plugins/access/index.cjs';
|
|
4
4
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
5
5
|
import { BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
|
|
6
|
-
import { o as organization, I as InferMember, a as InferInvitation, T as Team, b as Organization, M as Member, c as Invitation } from '../../shared/better-auth.
|
|
6
|
+
import { o as organization, I as InferMember, a as InferInvitation, T as Team, b as Organization, M as Member, c as Invitation } from '../../shared/better-auth.BLtLzuLI.cjs';
|
|
7
7
|
import { b as Prettify } from '../../shared/better-auth.Bi8FQwDD.cjs';
|
|
8
8
|
import { username } from '../../plugins/username/index.cjs';
|
|
9
9
|
import { Passkey, passkey } from '../../plugins/passkey/index.cjs';
|
|
@@ -3,7 +3,7 @@ import { atom } from 'nanostores';
|
|
|
3
3
|
import { AccessControl, Role, Statements, Subset, AuthortizeResponse } from '../../plugins/access/index.mjs';
|
|
4
4
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
5
5
|
import { BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
|
|
6
|
-
import { o as organization, I as InferMember, a as InferInvitation, T as Team, b as Organization, M as Member, c as Invitation } from '../../shared/better-auth.
|
|
6
|
+
import { o as organization, I as InferMember, a as InferInvitation, T as Team, b as Organization, M as Member, c as Invitation } from '../../shared/better-auth.D4ignKqt.mjs';
|
|
7
7
|
import { b as Prettify } from '../../shared/better-auth.Bi8FQwDD.mjs';
|
|
8
8
|
import { username } from '../../plugins/username/index.mjs';
|
|
9
9
|
import { Passkey, passkey } from '../../plugins/passkey/index.mjs';
|
|
@@ -3,7 +3,7 @@ import { atom } from 'nanostores';
|
|
|
3
3
|
import { AccessControl, Role, Statements, Subset, AuthortizeResponse } from '../../plugins/access/index.js';
|
|
4
4
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
5
5
|
import { BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
|
|
6
|
-
import { o as organization, I as InferMember, a as InferInvitation, T as Team, b as Organization, M as Member, c as Invitation } from '../../shared/better-auth.
|
|
6
|
+
import { o as organization, I as InferMember, a as InferInvitation, T as Team, b as Organization, M as Member, c as Invitation } from '../../shared/better-auth.977UjO4P.js';
|
|
7
7
|
import { b as Prettify } from '../../shared/better-auth.Bi8FQwDD.js';
|
|
8
8
|
import { username } from '../../plugins/username/index.js';
|
|
9
9
|
import { Passkey, passkey } from '../../plugins/passkey/index.js';
|
package/dist/index.cjs
CHANGED
|
@@ -23,7 +23,7 @@ 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.DhfiEsxl.cjs');
|
|
25
25
|
const index = require('./shared/better-auth.ANpbi45u.cjs');
|
|
26
|
-
const account = require('./shared/better-auth.
|
|
26
|
+
const account = require('./shared/better-auth.B_LJ7ih7.cjs');
|
|
27
27
|
const misc = require('./shared/better-auth.BLDOwz3i.cjs');
|
|
28
28
|
const state = require('./shared/better-auth.GgQnT00n.cjs');
|
|
29
29
|
require('./shared/better-auth.BgkOX1Ei.cjs');
|
package/dist/index.mjs
CHANGED
|
@@ -23,8 +23,8 @@ import { c as checkPassword } from './shared/better-auth.YwDQhoPc.mjs';
|
|
|
23
23
|
import { a as getBaseURL } from './shared/better-auth.NcLhHEks.mjs';
|
|
24
24
|
import { B as BetterAuthError } from './shared/better-auth.DdzSJf-n.mjs';
|
|
25
25
|
export { M as MissingDependencyError } from './shared/better-auth.DdzSJf-n.mjs';
|
|
26
|
-
import { B as BASE_ERROR_CODES } from './shared/better-auth.
|
|
27
|
-
export { H as HIDE_METADATA } from './shared/better-auth.
|
|
26
|
+
import { B as BASE_ERROR_CODES } from './shared/better-auth.jsVM_L7s.mjs';
|
|
27
|
+
export { H as HIDE_METADATA } from './shared/better-auth.jsVM_L7s.mjs';
|
|
28
28
|
export { c as capitalizeFirstLetter } from './shared/better-auth.D-2CmEwz.mjs';
|
|
29
29
|
export { g as generateState, p as parseState } from './shared/better-auth.CoMXyQ1y.mjs';
|
|
30
30
|
import './shared/better-auth.Duk7IG0N.mjs';
|
|
@@ -6,9 +6,9 @@ require('@better-auth/utils/hmac');
|
|
|
6
6
|
const cookies_index = require('../cookies/index.cjs');
|
|
7
7
|
require('better-call');
|
|
8
8
|
require('zod');
|
|
9
|
-
const account = require('../shared/better-auth.
|
|
9
|
+
const account = require('../shared/better-auth.B_LJ7ih7.cjs');
|
|
10
10
|
require('../shared/better-auth.CHyZMcYK.cjs');
|
|
11
|
-
require('../shared/better-auth.
|
|
11
|
+
require('../shared/better-auth.Cc21WQki.cjs');
|
|
12
12
|
require('../plugins/organization/access/index.cjs');
|
|
13
13
|
require('../shared/better-auth.CYeOI8C-.cjs');
|
|
14
14
|
require('../shared/better-auth.GpOOav9x.cjs');
|
|
@@ -22,7 +22,7 @@ require('@noble/hashes/scrypt');
|
|
|
22
22
|
require('@better-auth/utils');
|
|
23
23
|
require('@better-auth/utils/hex');
|
|
24
24
|
require('@noble/hashes/utils');
|
|
25
|
-
require('../shared/better-auth.
|
|
25
|
+
require('../shared/better-auth.Cju5zdPQ.cjs');
|
|
26
26
|
require('@better-auth/utils/otp');
|
|
27
27
|
require('../plugins/admin/access/index.cjs');
|
|
28
28
|
require('@better-fetch/fetch');
|
|
@@ -4,9 +4,9 @@ import '@better-auth/utils/hmac';
|
|
|
4
4
|
import { parseSetCookieHeader } from '../cookies/index.mjs';
|
|
5
5
|
import 'better-call';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import { c as createAuthMiddleware } from '../shared/better-auth.
|
|
7
|
+
import { c as createAuthMiddleware } from '../shared/better-auth.jsVM_L7s.mjs';
|
|
8
8
|
import '../shared/better-auth.C24Bzw4w.mjs';
|
|
9
|
-
import '../shared/better-auth.
|
|
9
|
+
import '../shared/better-auth.Dagzk3UO.mjs';
|
|
10
10
|
import '../plugins/organization/access/index.mjs';
|
|
11
11
|
import '../shared/better-auth.B4Qoxdgc.mjs';
|
|
12
12
|
import '../shared/better-auth.DH3YjMQH.mjs';
|
|
@@ -20,7 +20,7 @@ import '@noble/hashes/scrypt';
|
|
|
20
20
|
import '@better-auth/utils';
|
|
21
21
|
import '@better-auth/utils/hex';
|
|
22
22
|
import '@noble/hashes/utils';
|
|
23
|
-
import '../shared/better-auth.
|
|
23
|
+
import '../shared/better-auth.mLf3tSlS.mjs';
|
|
24
24
|
import '@better-auth/utils/otp';
|
|
25
25
|
import '../plugins/admin/access/index.mjs';
|
|
26
26
|
import '@better-fetch/fetch';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const admin = require('../../shared/better-auth.
|
|
3
|
+
const admin = require('../../shared/better-auth.Dy6opOJA.cjs');
|
|
4
4
|
require('zod');
|
|
5
5
|
require('better-call');
|
|
6
|
-
require('../../shared/better-auth.
|
|
6
|
+
require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
7
7
|
require('../../cookies/index.cjs');
|
|
8
8
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
9
9
|
require('../../shared/better-auth.C1hdVENX.cjs');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { a as admin } from '../../shared/better-auth.
|
|
1
|
+
export { a as admin } from '../../shared/better-auth.pf5SQkJM.mjs';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import 'better-call';
|
|
4
|
-
import '../../shared/better-auth.
|
|
4
|
+
import '../../shared/better-auth.jsVM_L7s.mjs';
|
|
5
5
|
import '../../cookies/index.mjs';
|
|
6
6
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
7
7
|
import '../../shared/better-auth.CW6D9eSx.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const betterCall = require('better-call');
|
|
4
|
-
const account = require('../../shared/better-auth.
|
|
4
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
5
5
|
require('zod');
|
|
6
6
|
const cookies_index = require('../../cookies/index.cjs');
|
|
7
7
|
const schema$1 = require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIError } from 'better-call';
|
|
2
|
-
import { c as createAuthMiddleware, a as createAuthEndpoint, g as getSessionFromCtx } from '../../shared/better-auth.
|
|
2
|
+
import { c as createAuthMiddleware, a as createAuthEndpoint, g as getSessionFromCtx } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import { parseSetCookieHeader, setSessionCookie } from '../../cookies/index.mjs';
|
|
5
5
|
import { m as mergeSchema } from '../../shared/better-auth.C24Bzw4w.mjs';
|
|
@@ -5,7 +5,7 @@ require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
|
5
5
|
require('@better-auth/utils/base64');
|
|
6
6
|
const hmac = require('@better-auth/utils/hmac');
|
|
7
7
|
const cookies_index = require('../../cookies/index.cjs');
|
|
8
|
-
const account = require('../../shared/better-auth.
|
|
8
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
9
9
|
require('zod');
|
|
10
10
|
require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
11
11
|
require('../../shared/better-auth.GpOOav9x.cjs');
|
|
@@ -3,7 +3,7 @@ import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
|
3
3
|
import '@better-auth/utils/base64';
|
|
4
4
|
import { createHMAC } from '@better-auth/utils/hmac';
|
|
5
5
|
import { parseSetCookieHeader } from '../../cookies/index.mjs';
|
|
6
|
-
import { c as createAuthMiddleware } from '../../shared/better-auth.
|
|
6
|
+
import { c as createAuthMiddleware } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
7
7
|
import 'zod';
|
|
8
8
|
import '../../shared/better-auth.C24Bzw4w.mjs';
|
|
9
9
|
import '../../shared/better-auth.DH3YjMQH.mjs';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
4
|
require('better-call');
|
|
5
|
-
const account = require('../../shared/better-auth.
|
|
5
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
6
6
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
7
7
|
require('@better-auth/utils/base64');
|
|
8
8
|
require('@better-auth/utils/hmac');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import 'better-call';
|
|
3
|
-
import { a as createAuthEndpoint, g as getSessionFromCtx } from '../../shared/better-auth.
|
|
3
|
+
import { a as createAuthEndpoint, g as getSessionFromCtx } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
4
4
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
5
5
|
import '@better-auth/utils/base64';
|
|
6
6
|
import '@better-auth/utils/hmac';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
|
-
const account = require('../../shared/better-auth.
|
|
5
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
6
6
|
const cookies_index = require('../../cookies/index.cjs');
|
|
7
7
|
require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
8
8
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
|
-
import { c as createAuthMiddleware, a as createAuthEndpoint } from '../../shared/better-auth.
|
|
3
|
+
import { c as createAuthMiddleware, a as createAuthEndpoint } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
4
4
|
import { setSessionCookie } from '../../cookies/index.mjs';
|
|
5
5
|
import '../../shared/better-auth.C24Bzw4w.mjs';
|
|
6
6
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const fetch = require('@better-fetch/fetch');
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
5
|
const zod = require('zod');
|
|
6
|
-
const account = require('../../shared/better-auth.
|
|
6
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
7
7
|
const cookies_index = require('../../cookies/index.cjs');
|
|
8
8
|
require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
9
9
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { betterFetch } from '@better-fetch/fetch';
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { a as createAuthEndpoint, s as sessionMiddleware, B as BASE_ERROR_CODES, h as handleOAuthUserInfo } from '../../shared/better-auth.
|
|
4
|
+
import { a as createAuthEndpoint, s as sessionMiddleware, B as BASE_ERROR_CODES, h as handleOAuthUserInfo } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
5
5
|
import { setSessionCookie } from '../../cookies/index.mjs';
|
|
6
6
|
import '../../shared/better-auth.C24Bzw4w.mjs';
|
|
7
7
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
package/dist/plugins/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const organization = require('../shared/better-auth.
|
|
3
|
+
const organization = require('../shared/better-auth.Cr4LHzLR.cjs');
|
|
4
4
|
const plugins_twoFactor_index = require('./two-factor/index.cjs');
|
|
5
5
|
const plugins_username_index = require('./username/index.cjs');
|
|
6
6
|
const plugins_bearer_index = require('./bearer/index.cjs');
|
|
7
|
-
const account = require('../shared/better-auth.
|
|
7
|
+
const account = require('../shared/better-auth.B_LJ7ih7.cjs');
|
|
8
8
|
const plugins_magicLink_index = require('./magic-link/index.cjs');
|
|
9
9
|
const plugins_phoneNumber_index = require('./phone-number/index.cjs');
|
|
10
10
|
const plugins_anonymous_index = require('./anonymous/index.cjs');
|
|
11
|
-
const admin = require('../shared/better-auth.
|
|
11
|
+
const admin = require('../shared/better-auth.Dy6opOJA.cjs');
|
|
12
12
|
const plugins_genericOauth_index = require('./generic-oauth/index.cjs');
|
|
13
13
|
const plugins_jwt_index = require('./jwt/index.cjs');
|
|
14
14
|
const plugins_multiSession_index = require('./multi-session/index.cjs');
|
|
@@ -46,14 +46,14 @@ const json = require('../shared/better-auth.D3mtHEZg.cjs');
|
|
|
46
46
|
const id = require('../shared/better-auth.Bg6iw3ig.cjs');
|
|
47
47
|
const plugins_access_index = require('./access/index.cjs');
|
|
48
48
|
const client = require('../shared/better-auth.DnER2-iT.cjs');
|
|
49
|
-
require('../shared/better-auth.
|
|
49
|
+
require('../shared/better-auth.Cc21WQki.cjs');
|
|
50
50
|
require('../cookies/index.cjs');
|
|
51
51
|
require('../shared/better-auth.ANpbi45u.cjs');
|
|
52
52
|
require('./organization/access/index.cjs');
|
|
53
53
|
require('../crypto/index.cjs');
|
|
54
54
|
require('../shared/better-auth.YUF6P-PB.cjs');
|
|
55
55
|
require('../shared/better-auth.BMYo0QR-.cjs');
|
|
56
|
-
require('../shared/better-auth.
|
|
56
|
+
require('../shared/better-auth.Cju5zdPQ.cjs');
|
|
57
57
|
require('../shared/better-auth.C1-vpKly.cjs');
|
|
58
58
|
require('@better-auth/utils/otp');
|
|
59
59
|
require('../shared/better-auth.CDXNofOe.cjs');
|
package/dist/plugins/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { O as OrganizationOptions, o as organization } from '../shared/better-auth.
|
|
1
|
+
export { O as OrganizationOptions, o as organization } from '../shared/better-auth.BLtLzuLI.cjs';
|
|
2
2
|
export { TwoFactorOptions, TwoFactorProvider, TwoFactorTable, UserWithTwoFactor, twoFactor, twoFactorClient } from './two-factor/index.cjs';
|
|
3
3
|
export { UsernameOptions, username } from './username/index.cjs';
|
|
4
4
|
export { bearer } from './bearer/index.cjs';
|
package/dist/plugins/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { O as OrganizationOptions, o as organization } from '../shared/better-auth.
|
|
1
|
+
export { O as OrganizationOptions, o as organization } from '../shared/better-auth.D4ignKqt.mjs';
|
|
2
2
|
export { TwoFactorOptions, TwoFactorProvider, TwoFactorTable, UserWithTwoFactor, twoFactor, twoFactorClient } from './two-factor/index.mjs';
|
|
3
3
|
export { UsernameOptions, username } from './username/index.mjs';
|
|
4
4
|
export { bearer } from './bearer/index.mjs';
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { O as OrganizationOptions, o as organization } from '../shared/better-auth.
|
|
1
|
+
export { O as OrganizationOptions, o as organization } from '../shared/better-auth.977UjO4P.js';
|
|
2
2
|
export { TwoFactorOptions, TwoFactorProvider, TwoFactorTable, UserWithTwoFactor, twoFactor, twoFactorClient } from './two-factor/index.js';
|
|
3
3
|
export { UsernameOptions, username } from './username/index.js';
|
|
4
4
|
export { bearer } from './bearer/index.js';
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { o as organization } from '../shared/better-auth.
|
|
1
|
+
export { o as organization } from '../shared/better-auth.BMQCpZqn.mjs';
|
|
2
2
|
export { twoFactor } from './two-factor/index.mjs';
|
|
3
3
|
export { username } from './username/index.mjs';
|
|
4
4
|
export { bearer } from './bearer/index.mjs';
|
|
5
|
-
import { a as createAuthEndpoint, g as getSessionFromCtx, s as sessionMiddleware, c as createAuthMiddleware } from '../shared/better-auth.
|
|
6
|
-
export { H as HIDE_METADATA, N as optionsMiddleware } from '../shared/better-auth.
|
|
5
|
+
import { a as createAuthEndpoint, g as getSessionFromCtx, s as sessionMiddleware, c as createAuthMiddleware } from '../shared/better-auth.jsVM_L7s.mjs';
|
|
6
|
+
export { H as HIDE_METADATA, N as optionsMiddleware } from '../shared/better-auth.jsVM_L7s.mjs';
|
|
7
7
|
export { magicLink } from './magic-link/index.mjs';
|
|
8
8
|
export { phoneNumber } from './phone-number/index.mjs';
|
|
9
9
|
export { anonymous } from './anonymous/index.mjs';
|
|
10
|
-
export { a as admin } from '../shared/better-auth.
|
|
10
|
+
export { a as admin } from '../shared/better-auth.pf5SQkJM.mjs';
|
|
11
11
|
export { genericOAuth } from './generic-oauth/index.mjs';
|
|
12
12
|
export { getJwtToken, jwt } from './jwt/index.mjs';
|
|
13
13
|
export { multiSession } from './multi-session/index.mjs';
|
|
@@ -45,14 +45,14 @@ import { s as safeJSONParse } from '../shared/better-auth.tB5eU6EY.mjs';
|
|
|
45
45
|
import { g as generateId } from '../shared/better-auth.BUPPRXfK.mjs';
|
|
46
46
|
import { role } from './access/index.mjs';
|
|
47
47
|
export { t as twoFactorClient } from '../shared/better-auth.Ddw8bVyV.mjs';
|
|
48
|
-
import '../shared/better-auth.
|
|
48
|
+
import '../shared/better-auth.Dagzk3UO.mjs';
|
|
49
49
|
import '../cookies/index.mjs';
|
|
50
50
|
import '../shared/better-auth.DdzSJf-n.mjs';
|
|
51
51
|
import './organization/access/index.mjs';
|
|
52
52
|
import '../crypto/index.mjs';
|
|
53
53
|
import '../shared/better-auth.OT3XFeFk.mjs';
|
|
54
54
|
import '../shared/better-auth.DDEbWX-S.mjs';
|
|
55
|
-
import '../shared/better-auth.
|
|
55
|
+
import '../shared/better-auth.mLf3tSlS.mjs';
|
|
56
56
|
import '../shared/better-auth.BcoSd9tC.mjs';
|
|
57
57
|
import '@better-auth/utils/otp';
|
|
58
58
|
import '../shared/better-auth.YwDQhoPc.mjs';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const schema$1 = require('../../shared/better-auth.BG6vHVNT.cjs');
|
|
4
4
|
const jose = require('jose');
|
|
5
5
|
require('better-call');
|
|
6
|
-
const account = require('../../shared/better-auth.
|
|
6
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
7
7
|
require('zod');
|
|
8
8
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
9
9
|
require('@better-auth/utils/base64');
|
|
@@ -90,7 +90,7 @@ async function getJwtToken(ctx, options) {
|
|
|
90
90
|
publicKey: JSON.stringify(publicWebKey),
|
|
91
91
|
privateKey: privateKeyEncryptionEnabled ? JSON.stringify(
|
|
92
92
|
await crypto_index.symmetricEncrypt({
|
|
93
|
-
key: ctx.context.
|
|
93
|
+
key: ctx.context.secret,
|
|
94
94
|
data: stringifiedPrivateWebKey
|
|
95
95
|
})
|
|
96
96
|
) : stringifiedPrivateWebKey,
|
|
@@ -99,7 +99,7 @@ async function getJwtToken(ctx, options) {
|
|
|
99
99
|
key = await adapter.createJwk(jwk);
|
|
100
100
|
}
|
|
101
101
|
let privateWebKey = privateKeyEncryptionEnabled ? await crypto_index.symmetricDecrypt({
|
|
102
|
-
key: ctx.context.
|
|
102
|
+
key: ctx.context.secret,
|
|
103
103
|
data: JSON.parse(key.privateKey)
|
|
104
104
|
}) : key.privateKey;
|
|
105
105
|
const privateKey = await jose.importJWK(
|
|
@@ -107,13 +107,7 @@ async function getJwtToken(ctx, options) {
|
|
|
107
107
|
options?.jwks?.keyPairConfig?.alg ?? "EdDSA"
|
|
108
108
|
);
|
|
109
109
|
const payload = !options?.jwt?.definePayload ? ctx.context.session.user : await options?.jwt.definePayload(ctx.context.session);
|
|
110
|
-
const jwt2 = await new jose.SignJWT({
|
|
111
|
-
...payload,
|
|
112
|
-
// I am aware that this is not the best way to handle this, but this is the only way I know to get the impersonatedBy field
|
|
113
|
-
...ctx.context.session.session.impersonatedBy ? {
|
|
114
|
-
impersonatedBy: ctx.context.session.session.impersonatedBy
|
|
115
|
-
} : {}
|
|
116
|
-
}).setProtectedHeader({
|
|
110
|
+
const jwt2 = await new jose.SignJWT(payload).setProtectedHeader({
|
|
117
111
|
alg: options?.jwks?.keyPairConfig?.alg ?? "EdDSA",
|
|
118
112
|
kid: key.id
|
|
119
113
|
}).setIssuedAt().setIssuer(options?.jwt?.issuer ?? ctx.context.options.baseURL).setAudience(options?.jwt?.audience ?? ctx.context.options.baseURL).setExpirationTime(options?.jwt?.expirationTime ?? "15m").setSubject(ctx.context.session.user.id).sign(privateKey);
|
|
@@ -196,7 +190,7 @@ const jwt = (options) => {
|
|
|
196
190
|
publicKey: JSON.stringify({ alg, ...publicWebKey }),
|
|
197
191
|
privateKey: privateKeyEncryptionEnabled ? JSON.stringify(
|
|
198
192
|
await crypto_index.symmetricEncrypt({
|
|
199
|
-
key: ctx.context.
|
|
193
|
+
key: ctx.context.secret,
|
|
200
194
|
data: stringifiedPrivateWebKey
|
|
201
195
|
})
|
|
202
196
|
) : stringifiedPrivateWebKey,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as schema } from '../../shared/better-auth.fsvwNeUx.mjs';
|
|
2
2
|
import { generateKeyPair, exportJWK, importJWK, SignJWT } from 'jose';
|
|
3
3
|
import 'better-call';
|
|
4
|
-
import { c as createAuthMiddleware, a as createAuthEndpoint, s as sessionMiddleware } from '../../shared/better-auth.
|
|
4
|
+
import { c as createAuthMiddleware, a as createAuthEndpoint, s as sessionMiddleware } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
7
7
|
import '@better-auth/utils/base64';
|
|
@@ -88,7 +88,7 @@ async function getJwtToken(ctx, options) {
|
|
|
88
88
|
publicKey: JSON.stringify(publicWebKey),
|
|
89
89
|
privateKey: privateKeyEncryptionEnabled ? JSON.stringify(
|
|
90
90
|
await symmetricEncrypt({
|
|
91
|
-
key: ctx.context.
|
|
91
|
+
key: ctx.context.secret,
|
|
92
92
|
data: stringifiedPrivateWebKey
|
|
93
93
|
})
|
|
94
94
|
) : stringifiedPrivateWebKey,
|
|
@@ -97,7 +97,7 @@ async function getJwtToken(ctx, options) {
|
|
|
97
97
|
key = await adapter.createJwk(jwk);
|
|
98
98
|
}
|
|
99
99
|
let privateWebKey = privateKeyEncryptionEnabled ? await symmetricDecrypt({
|
|
100
|
-
key: ctx.context.
|
|
100
|
+
key: ctx.context.secret,
|
|
101
101
|
data: JSON.parse(key.privateKey)
|
|
102
102
|
}) : key.privateKey;
|
|
103
103
|
const privateKey = await importJWK(
|
|
@@ -105,13 +105,7 @@ async function getJwtToken(ctx, options) {
|
|
|
105
105
|
options?.jwks?.keyPairConfig?.alg ?? "EdDSA"
|
|
106
106
|
);
|
|
107
107
|
const payload = !options?.jwt?.definePayload ? ctx.context.session.user : await options?.jwt.definePayload(ctx.context.session);
|
|
108
|
-
const jwt2 = await new SignJWT({
|
|
109
|
-
...payload,
|
|
110
|
-
// I am aware that this is not the best way to handle this, but this is the only way I know to get the impersonatedBy field
|
|
111
|
-
...ctx.context.session.session.impersonatedBy ? {
|
|
112
|
-
impersonatedBy: ctx.context.session.session.impersonatedBy
|
|
113
|
-
} : {}
|
|
114
|
-
}).setProtectedHeader({
|
|
108
|
+
const jwt2 = await new SignJWT(payload).setProtectedHeader({
|
|
115
109
|
alg: options?.jwks?.keyPairConfig?.alg ?? "EdDSA",
|
|
116
110
|
kid: key.id
|
|
117
111
|
}).setIssuedAt().setIssuer(options?.jwt?.issuer ?? ctx.context.options.baseURL).setAudience(options?.jwt?.audience ?? ctx.context.options.baseURL).setExpirationTime(options?.jwt?.expirationTime ?? "15m").setSubject(ctx.context.session.user.id).sign(privateKey);
|
|
@@ -194,7 +188,7 @@ const jwt = (options) => {
|
|
|
194
188
|
publicKey: JSON.stringify({ alg, ...publicWebKey }),
|
|
195
189
|
privateKey: privateKeyEncryptionEnabled ? JSON.stringify(
|
|
196
190
|
await symmetricEncrypt({
|
|
197
|
-
key: ctx.context.
|
|
191
|
+
key: ctx.context.secret,
|
|
198
192
|
data: stringifiedPrivateWebKey
|
|
199
193
|
})
|
|
200
194
|
) : stringifiedPrivateWebKey,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
|
-
const account = require('../../shared/better-auth.
|
|
4
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
5
5
|
const betterCall = require('better-call');
|
|
6
6
|
const cookies_index = require('../../cookies/index.cjs');
|
|
7
7
|
require('@better-auth/utils/hash');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { a as createAuthEndpoint, o as originCheck, B as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
2
|
+
import { a as createAuthEndpoint, o as originCheck, B as BASE_ERROR_CODES } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
3
3
|
import { APIError } from 'better-call';
|
|
4
4
|
import { setSessionCookie } from '../../cookies/index.mjs';
|
|
5
5
|
import '@better-auth/utils/hash';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
|
-
const account = require('../../shared/better-auth.
|
|
5
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
6
6
|
const cookies_index = require('../../cookies/index.cjs');
|
|
7
7
|
require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
8
8
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
|
-
import { c as createAuthMiddleware, a as createAuthEndpoint, s as sessionMiddleware } from '../../shared/better-auth.
|
|
3
|
+
import { c as createAuthMiddleware, a as createAuthEndpoint, s as sessionMiddleware } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
4
4
|
import { parseSetCookieHeader, parseCookies, setSessionCookie, deleteSessionCookie } from '../../cookies/index.mjs';
|
|
5
5
|
import '../../shared/better-auth.C24Bzw4w.mjs';
|
|
6
6
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
4
|
require('better-call');
|
|
5
|
-
const account = require('../../shared/better-auth.
|
|
5
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
6
6
|
const env = require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
7
7
|
require('@better-auth/utils/base64');
|
|
8
8
|
require('@better-auth/utils/hmac');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import 'better-call';
|
|
3
|
-
import { c as createAuthMiddleware, a as createAuthEndpoint, o as originCheck } from '../../shared/better-auth.
|
|
3
|
+
import { c as createAuthMiddleware, a as createAuthEndpoint, o as originCheck } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
4
4
|
import { e as env } from '../../shared/better-auth.8zoxzg-F.mjs';
|
|
5
5
|
import '@better-auth/utils/base64';
|
|
6
6
|
import '@better-auth/utils/hmac';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const jose = require('jose');
|
|
4
4
|
const zod = require('zod');
|
|
5
5
|
const betterCall = require('better-call');
|
|
6
|
-
const account = require('../../shared/better-auth.
|
|
6
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
7
7
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
8
8
|
const base64 = require('@better-auth/utils/base64');
|
|
9
9
|
require('@better-auth/utils/hmac');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SignJWT } from 'jose';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { APIError } from 'better-call';
|
|
4
|
-
import { g as getSessionFromCtx, a as createAuthEndpoint, c as createAuthMiddleware, s as sessionMiddleware } from '../../shared/better-auth.
|
|
4
|
+
import { g as getSessionFromCtx, a as createAuthEndpoint, c as createAuthMiddleware, s as sessionMiddleware } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
5
5
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
6
6
|
import { base64 } from '@better-auth/utils/base64';
|
|
7
7
|
import '@better-auth/utils/hmac';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
|
-
const account = require('../../shared/better-auth.
|
|
5
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
6
6
|
const cookies_index = require('../../cookies/index.cjs');
|
|
7
7
|
require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
8
8
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
|
-
import { a as createAuthEndpoint } from '../../shared/better-auth.
|
|
3
|
+
import { a as createAuthEndpoint } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
4
4
|
import { setSessionCookie } from '../../cookies/index.mjs';
|
|
5
5
|
import '../../shared/better-auth.C24Bzw4w.mjs';
|
|
6
6
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
@@ -20,7 +20,7 @@ require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
|
20
20
|
require('../../shared/better-auth.GpOOav9x.cjs');
|
|
21
21
|
const getTables = require('../../shared/better-auth.BEphVDyL.cjs');
|
|
22
22
|
require('kysely');
|
|
23
|
-
const account = require('../../shared/better-auth.
|
|
23
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
24
24
|
require('@better-auth/utils/hmac');
|
|
25
25
|
require('defu');
|
|
26
26
|
require('../../cookies/index.cjs');
|
|
@@ -18,7 +18,7 @@ import '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
|
18
18
|
import '../../shared/better-auth.DH3YjMQH.mjs';
|
|
19
19
|
import { g as getAuthTables } from '../../shared/better-auth.DORkW_Ge.mjs';
|
|
20
20
|
import 'kysely';
|
|
21
|
-
import { a as createAuthEndpoint } from '../../shared/better-auth.
|
|
21
|
+
import { a as createAuthEndpoint } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
22
22
|
import '@better-auth/utils/hmac';
|
|
23
23
|
import 'defu';
|
|
24
24
|
import '../../cookies/index.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const organization = require('../../shared/better-auth.
|
|
3
|
+
const organization = require('../../shared/better-auth.Cr4LHzLR.cjs');
|
|
4
4
|
require('better-call');
|
|
5
5
|
require('zod');
|
|
6
|
-
require('../../shared/better-auth.
|
|
6
|
+
require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
7
7
|
require('../../cookies/index.cjs');
|
|
8
8
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
9
9
|
require('../../shared/better-auth.C1hdVENX.cjs');
|
|
@@ -34,7 +34,7 @@ require('../../shared/better-auth.BMYo0QR-.cjs');
|
|
|
34
34
|
require('../../shared/better-auth.DhfiEsxl.cjs');
|
|
35
35
|
require('jose/errors');
|
|
36
36
|
require('@better-auth/utils/binary');
|
|
37
|
-
require('../../shared/better-auth.
|
|
37
|
+
require('../../shared/better-auth.Cc21WQki.cjs');
|
|
38
38
|
require('../../shared/better-auth.DhsGZ30Q.cjs');
|
|
39
39
|
require('./access/index.cjs');
|
|
40
40
|
require('../access/index.cjs');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { O as OrganizationOptions, o as organization } from '../../shared/better-auth.
|
|
1
|
+
export { O as OrganizationOptions, o as organization } from '../../shared/better-auth.BLtLzuLI.cjs';
|
|
2
2
|
import '../access/index.cjs';
|
|
3
3
|
import '../../shared/better-auth.Bi8FQwDD.cjs';
|
|
4
4
|
import 'zod';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { O as OrganizationOptions, o as organization } from '../../shared/better-auth.
|
|
1
|
+
export { O as OrganizationOptions, o as organization } from '../../shared/better-auth.D4ignKqt.mjs';
|
|
2
2
|
import '../access/index.mjs';
|
|
3
3
|
import '../../shared/better-auth.Bi8FQwDD.mjs';
|
|
4
4
|
import 'zod';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { O as OrganizationOptions, o as organization } from '../../shared/better-auth.
|
|
1
|
+
export { O as OrganizationOptions, o as organization } from '../../shared/better-auth.977UjO4P.js';
|
|
2
2
|
import '../access/index.js';
|
|
3
3
|
import '../../shared/better-auth.Bi8FQwDD.js';
|
|
4
4
|
import 'zod';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { o as organization } from '../../shared/better-auth.
|
|
1
|
+
export { o as organization } from '../../shared/better-auth.BMQCpZqn.mjs';
|
|
2
2
|
import 'better-call';
|
|
3
3
|
import 'zod';
|
|
4
|
-
import '../../shared/better-auth.
|
|
4
|
+
import '../../shared/better-auth.jsVM_L7s.mjs';
|
|
5
5
|
import '../../cookies/index.mjs';
|
|
6
6
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
7
7
|
import '../../shared/better-auth.CW6D9eSx.mjs';
|
|
@@ -32,7 +32,7 @@ import '../../shared/better-auth.DDEbWX-S.mjs';
|
|
|
32
32
|
import '../../shared/better-auth.NcLhHEks.mjs';
|
|
33
33
|
import 'jose/errors';
|
|
34
34
|
import '@better-auth/utils/binary';
|
|
35
|
-
import '../../shared/better-auth.
|
|
35
|
+
import '../../shared/better-auth.Dagzk3UO.mjs';
|
|
36
36
|
import '../../shared/better-auth.ffWeg50w.mjs';
|
|
37
37
|
import './access/index.mjs';
|
|
38
38
|
import '../access/index.mjs';
|
|
@@ -4,7 +4,7 @@ const server = require('@simplewebauthn/server');
|
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
5
|
const random = require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
6
6
|
const zod = require('zod');
|
|
7
|
-
const account = require('../../shared/better-auth.
|
|
7
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
8
8
|
const cookies_index = require('../../cookies/index.cjs');
|
|
9
9
|
const schema$1 = require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
10
10
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
@@ -2,7 +2,7 @@ import { verifyAuthenticationResponse, verifyRegistrationResponse, generateAuthe
|
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
3
|
import { g as generateRandomString } from '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { a as createAuthEndpoint, s as sessionMiddleware, f as freshSessionMiddleware, g as getSessionFromCtx } from '../../shared/better-auth.
|
|
5
|
+
import { a as createAuthEndpoint, s as sessionMiddleware, f as freshSessionMiddleware, g as getSessionFromCtx } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
6
6
|
import { setSessionCookie } from '../../cookies/index.mjs';
|
|
7
7
|
import { m as mergeSchema } from '../../shared/better-auth.C24Bzw4w.mjs';
|
|
8
8
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
|
-
const account = require('../../shared/better-auth.
|
|
4
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
5
5
|
const betterCall = require('better-call');
|
|
6
6
|
const schema$1 = require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
7
7
|
const random = require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { a as createAuthEndpoint, g as getSessionFromCtx, B as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
2
|
+
import { a as createAuthEndpoint, g as getSessionFromCtx, B as BASE_ERROR_CODES } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
3
3
|
import { APIError } from 'better-call';
|
|
4
4
|
import { m as mergeSchema } from '../../shared/better-auth.C24Bzw4w.mjs';
|
|
5
5
|
import { g as generateRandomString } from '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
|
-
const account = require('../../shared/better-auth.
|
|
5
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
6
6
|
const cookies_index = require('../../cookies/index.cjs');
|
|
7
7
|
require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
8
8
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
|
-
import { a as createAuthEndpoint, h as handleOAuthUserInfo, s as sessionMiddleware } from '../../shared/better-auth.
|
|
3
|
+
import { a as createAuthEndpoint, h as handleOAuthUserInfo, s as sessionMiddleware } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
4
4
|
import { setSessionCookie } from '../../cookies/index.mjs';
|
|
5
5
|
import '../../shared/better-auth.C24Bzw4w.mjs';
|
|
6
6
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const random = require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
4
4
|
const zod = require('zod');
|
|
5
|
-
const account = require('../../shared/better-auth.
|
|
5
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
6
6
|
const betterCall = require('better-call');
|
|
7
7
|
const cookies_index = require('../../cookies/index.cjs');
|
|
8
8
|
const schema$1 = require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
@@ -10,7 +10,7 @@ require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
|
10
10
|
require('../../shared/better-auth.GpOOav9x.cjs');
|
|
11
11
|
require('defu');
|
|
12
12
|
const crypto_index = require('../../crypto/index.cjs');
|
|
13
|
-
const verifyMiddleware = require('../../shared/better-auth.
|
|
13
|
+
const verifyMiddleware = require('../../shared/better-auth.Cju5zdPQ.cjs');
|
|
14
14
|
const errorCode = require('../../shared/better-auth.C1-vpKly.cjs');
|
|
15
15
|
require('@better-auth/utils/hash');
|
|
16
16
|
require('@noble/ciphers/chacha');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as generateRandomString } from '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { a as createAuthEndpoint, s as sessionMiddleware, c as createAuthMiddleware, B as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
3
|
+
import { a as createAuthEndpoint, s as sessionMiddleware, c as createAuthMiddleware, B as BASE_ERROR_CODES } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
4
4
|
import { APIError } from 'better-call';
|
|
5
5
|
import { setSessionCookie, deleteSessionCookie } from '../../cookies/index.mjs';
|
|
6
6
|
import { m as mergeSchema } from '../../shared/better-auth.C24Bzw4w.mjs';
|
|
@@ -8,7 +8,7 @@ import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
|
8
8
|
import '../../shared/better-auth.DH3YjMQH.mjs';
|
|
9
9
|
import 'defu';
|
|
10
10
|
import { symmetricEncrypt, symmetricDecrypt } from '../../crypto/index.mjs';
|
|
11
|
-
import { v as verifyTwoFactorMiddleware, T as TRUST_DEVICE_COOKIE_NAME, a as TWO_FACTOR_COOKIE_NAME } from '../../shared/better-auth.
|
|
11
|
+
import { v as verifyTwoFactorMiddleware, T as TRUST_DEVICE_COOKIE_NAME, a as TWO_FACTOR_COOKIE_NAME } from '../../shared/better-auth.mLf3tSlS.mjs';
|
|
12
12
|
import { T as TWO_FACTOR_ERROR_CODES } from '../../shared/better-auth.BcoSd9tC.mjs';
|
|
13
13
|
import '@better-auth/utils/hash';
|
|
14
14
|
import '@noble/ciphers/chacha';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
|
-
const account = require('../../shared/better-auth.
|
|
4
|
+
const account = require('../../shared/better-auth.B_LJ7ih7.cjs');
|
|
5
5
|
const betterCall = require('better-call');
|
|
6
6
|
const cookies_index = require('../../cookies/index.cjs');
|
|
7
7
|
const schema$1 = require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { c as createAuthMiddleware, a as createAuthEndpoint, b as sendVerificationEmailFn, B as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
2
|
+
import { c as createAuthMiddleware, a as createAuthEndpoint, b as sendVerificationEmailFn, B as BASE_ERROR_CODES } from '../../shared/better-auth.jsVM_L7s.mjs';
|
|
3
3
|
import { APIError } from 'better-call';
|
|
4
4
|
import { setSessionCookie } from '../../cookies/index.mjs';
|
|
5
5
|
import { m as mergeSchema } from '../../shared/better-auth.C24Bzw4w.mjs';
|
|
@@ -217,7 +217,7 @@ interface OrganizationOptions {
|
|
|
217
217
|
/**
|
|
218
218
|
* Pass a custom default team creator function
|
|
219
219
|
*/
|
|
220
|
-
customCreateDefaultTeam
|
|
220
|
+
customCreateDefaultTeam?: (organization: Organization & Record<string, any>, request?: Request) => Promise<Team & Record<string, any>>;
|
|
221
221
|
};
|
|
222
222
|
/**
|
|
223
223
|
* Maximum number of teams an organization can have.
|
|
@@ -217,7 +217,7 @@ interface OrganizationOptions {
|
|
|
217
217
|
/**
|
|
218
218
|
* Pass a custom default team creator function
|
|
219
219
|
*/
|
|
220
|
-
customCreateDefaultTeam
|
|
220
|
+
customCreateDefaultTeam?: (organization: Organization & Record<string, any>, request?: Request) => Promise<Team & Record<string, any>>;
|
|
221
221
|
};
|
|
222
222
|
/**
|
|
223
223
|
* Maximum number of teams an organization can have.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { APIError } from 'better-call';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { a as createAuthEndpoint, g as getSessionFromCtx } from './better-auth.
|
|
3
|
+
import { a as createAuthEndpoint, g as getSessionFromCtx } from './better-auth.jsVM_L7s.mjs';
|
|
4
4
|
import './better-auth.8zoxzg-F.mjs';
|
|
5
5
|
import '@better-auth/utils/base64';
|
|
6
6
|
import '@better-auth/utils/hmac';
|
|
7
7
|
import './better-auth.C24Bzw4w.mjs';
|
|
8
|
-
import { u as updateMemberRole, a as addMember, c as createInvitation, g as getFullOrganization, s as setActiveOrganization, b as createTeam, d as updateTeam, r as removeTeam, l as listOrganizationTeams, e as leaveOrganization, f as getActiveMember, h as removeMember, i as checkOrganizationSlug, j as rejectInvitation, k as getInvitation, m as acceptInvitation, n as cancelInvitation, o as listOrganizations, p as deleteOrganization, q as updateOrganization, t as createOrganization, O as ORGANIZATION_ERROR_CODES, v as orgSessionMiddleware, w as getOrgAdapter, x as hasPermission } from './better-auth.
|
|
8
|
+
import { u as updateMemberRole, a as addMember, c as createInvitation, g as getFullOrganization, s as setActiveOrganization, b as createTeam, d as updateTeam, r as removeTeam, l as listOrganizationTeams, e as leaveOrganization, f as getActiveMember, h as removeMember, i as checkOrganizationSlug, j as rejectInvitation, k as getInvitation, m as acceptInvitation, n as cancelInvitation, o as listOrganizations, p as deleteOrganization, q as updateOrganization, t as createOrganization, O as ORGANIZATION_ERROR_CODES, v as orgSessionMiddleware, w as getOrgAdapter, x as hasPermission } from './better-auth.Dagzk3UO.mjs';
|
|
9
9
|
import { defaultRoles } from '../plugins/organization/access/index.mjs';
|
|
10
10
|
|
|
11
11
|
const shimContext = (originalObject, newContext) => {
|
|
@@ -2608,6 +2608,13 @@ const changeEmail = createAuthEndpoint(
|
|
|
2608
2608
|
},
|
|
2609
2609
|
ctx
|
|
2610
2610
|
);
|
|
2611
|
+
await cookies_index.setSessionCookie(ctx, {
|
|
2612
|
+
session: ctx.context.session.session,
|
|
2613
|
+
user: {
|
|
2614
|
+
...ctx.context.session.user,
|
|
2615
|
+
email: ctx.body.newEmail
|
|
2616
|
+
}
|
|
2617
|
+
});
|
|
2611
2618
|
if (ctx.context.options.emailVerification?.sendVerificationEmail) {
|
|
2612
2619
|
const token2 = await createEmailVerificationToken(
|
|
2613
2620
|
ctx.context.secret,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
|
-
const account = require('./better-auth.
|
|
4
|
+
const account = require('./better-auth.B_LJ7ih7.cjs');
|
|
5
5
|
require('./better-auth.DiSjtgs9.cjs');
|
|
6
6
|
require('@better-auth/utils/base64');
|
|
7
7
|
require('@better-auth/utils/hmac');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const betterCall = require('better-call');
|
|
4
|
-
const account = require('./better-auth.
|
|
4
|
+
const account = require('./better-auth.B_LJ7ih7.cjs');
|
|
5
5
|
const cookies_index = require('../cookies/index.cjs');
|
|
6
6
|
const zod = require('zod');
|
|
7
7
|
require('./better-auth.CHyZMcYK.cjs');
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
const betterCall = require('better-call');
|
|
4
4
|
const zod = require('zod');
|
|
5
|
-
const account = require('./better-auth.
|
|
5
|
+
const account = require('./better-auth.B_LJ7ih7.cjs');
|
|
6
6
|
require('./better-auth.DiSjtgs9.cjs');
|
|
7
7
|
require('@better-auth/utils/base64');
|
|
8
8
|
require('@better-auth/utils/hmac');
|
|
9
9
|
require('./better-auth.CHyZMcYK.cjs');
|
|
10
|
-
const crudTeam = require('./better-auth.
|
|
10
|
+
const crudTeam = require('./better-auth.Cc21WQki.cjs');
|
|
11
11
|
const plugins_organization_access_index = require('../plugins/organization/access/index.cjs');
|
|
12
12
|
|
|
13
13
|
const shimContext = (originalObject, newContext) => {
|
|
@@ -217,7 +217,7 @@ interface OrganizationOptions {
|
|
|
217
217
|
/**
|
|
218
218
|
* Pass a custom default team creator function
|
|
219
219
|
*/
|
|
220
|
-
customCreateDefaultTeam
|
|
220
|
+
customCreateDefaultTeam?: (organization: Organization & Record<string, any>, request?: Request) => Promise<Team & Record<string, any>>;
|
|
221
221
|
};
|
|
222
222
|
/**
|
|
223
223
|
* Maximum number of teams an organization can have.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { c as createAuthMiddleware, s as sessionMiddleware, a as createAuthEndpoint, g as getSessionFromCtx, B as BASE_ERROR_CODES, M as requestOnlySessionMiddleware } from './better-auth.
|
|
2
|
+
import { c as createAuthMiddleware, s as sessionMiddleware, a as createAuthEndpoint, g as getSessionFromCtx, B as BASE_ERROR_CODES, M as requestOnlySessionMiddleware } from './better-auth.jsVM_L7s.mjs';
|
|
3
3
|
import './better-auth.8zoxzg-F.mjs';
|
|
4
4
|
import '@better-auth/utils/base64';
|
|
5
5
|
import '@better-auth/utils/hmac';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
|
-
const account = require('./better-auth.
|
|
5
|
+
const account = require('./better-auth.B_LJ7ih7.cjs');
|
|
6
6
|
const cookies_index = require('../cookies/index.cjs');
|
|
7
7
|
const schema$1 = require('./better-auth.CHyZMcYK.cjs');
|
|
8
8
|
require('./better-auth.DiSjtgs9.cjs');
|
|
@@ -2606,6 +2606,13 @@ const changeEmail = createAuthEndpoint(
|
|
|
2606
2606
|
},
|
|
2607
2607
|
ctx
|
|
2608
2608
|
);
|
|
2609
|
+
await setSessionCookie(ctx, {
|
|
2610
|
+
session: ctx.context.session.session,
|
|
2611
|
+
user: {
|
|
2612
|
+
...ctx.context.session.user,
|
|
2613
|
+
email: ctx.body.newEmail
|
|
2614
|
+
}
|
|
2615
|
+
});
|
|
2609
2616
|
if (ctx.context.options.emailVerification?.sendVerificationEmail) {
|
|
2610
2617
|
const token2 = await createEmailVerificationToken(
|
|
2611
2618
|
ctx.context.secret,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIError } from 'better-call';
|
|
2
|
-
import { c as createAuthMiddleware, g as getSessionFromCtx } from './better-auth.
|
|
2
|
+
import { c as createAuthMiddleware, g as getSessionFromCtx } from './better-auth.jsVM_L7s.mjs';
|
|
3
3
|
import { setSessionCookie } from '../cookies/index.mjs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import './better-auth.C24Bzw4w.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
|
-
import { c as createAuthMiddleware, g as getSessionFromCtx, a as createAuthEndpoint } from './better-auth.
|
|
3
|
+
import { c as createAuthMiddleware, g as getSessionFromCtx, a as createAuthEndpoint } from './better-auth.jsVM_L7s.mjs';
|
|
4
4
|
import { setSessionCookie, deleteSessionCookie } from '../cookies/index.mjs';
|
|
5
5
|
import { m as mergeSchema } from './better-auth.C24Bzw4w.mjs';
|
|
6
6
|
import './better-auth.8zoxzg-F.mjs';
|