better-auth 1.3.6 → 1.3.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.mjs +2 -2
- 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/client/react/index.d.cts +6 -6
- package/dist/client/react/index.d.mts +6 -6
- package/dist/client/react/index.d.ts +6 -6
- package/dist/client/vue/index.d.cts +9 -9
- package/dist/client/vue/index.d.mts +9 -9
- package/dist/client/vue/index.d.ts +9 -9
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +5 -5
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +2 -2
- package/dist/integrations/next-js.cjs +2 -2
- package/dist/integrations/next-js.mjs +2 -2
- package/dist/integrations/react-start.cjs +2 -2
- package/dist/integrations/react-start.mjs +2 -2
- package/dist/integrations/svelte-kit.cjs +1 -1
- package/dist/integrations/svelte-kit.mjs +1 -1
- package/dist/oauth2/index.cjs +1 -1
- package/dist/oauth2/index.mjs +1 -1
- package/dist/plugins/admin/index.cjs +2 -2
- package/dist/plugins/admin/index.d.cts +3 -3
- package/dist/plugins/admin/index.d.mts +3 -3
- package/dist/plugins/admin/index.d.ts +3 -3
- 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 +124 -8
- package/dist/plugins/email-otp/index.d.cts +87 -0
- package/dist/plugins/email-otp/index.d.mts +87 -0
- package/dist/plugins/email-otp/index.d.ts +87 -0
- package/dist/plugins/email-otp/index.mjs +124 -8
- package/dist/plugins/generic-oauth/index.cjs +1 -1
- package/dist/plugins/generic-oauth/index.mjs +1 -1
- package/dist/plugins/haveibeenpwned/index.cjs +1 -1
- package/dist/plugins/haveibeenpwned/index.mjs +1 -1
- package/dist/plugins/index.cjs +6 -6
- package/dist/plugins/index.d.cts +3 -3
- package/dist/plugins/index.d.mts +3 -3
- package/dist/plugins/index.d.ts +3 -3
- package/dist/plugins/index.mjs +8 -8
- package/dist/plugins/jwt/index.cjs +1 -1
- package/dist/plugins/jwt/index.mjs +1 -1
- package/dist/plugins/magic-link/index.cjs +1 -1
- package/dist/plugins/magic-link/index.mjs +1 -1
- package/dist/plugins/multi-session/index.cjs +1 -1
- package/dist/plugins/multi-session/index.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 +2 -2
- package/dist/plugins/oidc-provider/index.d.cts +4 -4
- package/dist/plugins/oidc-provider/index.d.mts +4 -4
- package/dist/plugins/oidc-provider/index.d.ts +4 -4
- package/dist/plugins/oidc-provider/index.mjs +2 -2
- package/dist/plugins/one-tap/index.cjs +1 -1
- package/dist/plugins/one-tap/index.mjs +1 -1
- package/dist/plugins/one-time-token/index.cjs +3 -3
- package/dist/plugins/one-time-token/index.mjs +3 -3
- 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.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/siwe/index.cjs +1 -1
- package/dist/plugins/siwe/index.mjs +1 -1
- package/dist/plugins/sso/index.cjs +1 -1
- package/dist/plugins/sso/index.d.cts +2 -2
- package/dist/plugins/sso/index.d.mts +2 -2
- package/dist/plugins/sso/index.d.ts +2 -2
- package/dist/plugins/sso/index.mjs +1 -1
- package/dist/plugins/two-factor/index.cjs +1 -1
- package/dist/plugins/two-factor/index.mjs +1 -1
- package/dist/plugins/username/index.cjs +9 -9
- package/dist/plugins/username/index.d.cts +2 -2
- package/dist/plugins/username/index.d.mts +2 -2
- package/dist/plugins/username/index.d.ts +2 -2
- package/dist/plugins/username/index.mjs +9 -9
- package/dist/shared/{better-auth.BGW0dEjq.d.cts → better-auth.20-VDNhc.d.cts} +4 -4
- package/dist/shared/{better-auth.B4Jj3q3a.d.ts → better-auth.BZCIev3z.d.ts} +4 -4
- package/dist/shared/{better-auth.BtekRHFA.cjs → better-auth.BfrrzKqK.cjs} +26 -10
- package/dist/shared/{better-auth.CKa-q341.cjs → better-auth.BjdU6KcM.cjs} +1 -1
- package/dist/shared/{better-auth.D7DBFMfx.mjs → better-auth.Blf9suYs.mjs} +1 -1
- package/dist/shared/{better-auth.Bl-It_5c.cjs → better-auth.BmvbW_9e.cjs} +2 -1
- package/dist/shared/{better-auth.BlWIxee_.cjs → better-auth.CJMpoiLX.cjs} +2 -2
- package/dist/shared/{better-auth.BMerxQY0.mjs → better-auth.CaG_EZI6.mjs} +2 -2
- package/dist/shared/{better-auth.DKBKIpqZ.mjs → better-auth.Cnw8a5Vf.mjs} +2 -2
- package/dist/shared/{better-auth.3oHgUdBc.cjs → better-auth.CpIqcmvR.cjs} +2 -2
- package/dist/shared/{better-auth.BiJrzSAH.d.mts → better-auth.CqQYJ6k0.d.mts} +4 -4
- package/dist/shared/{better-auth.D317Sdx8.cjs → better-auth.D3o8uSQJ.cjs} +1 -1
- package/dist/shared/{better-auth.CdFBGG9K.cjs → better-auth.DLq75-D6.cjs} +2 -2
- package/dist/shared/{better-auth.Da95z4LY.mjs → better-auth.DQVsWzlJ.mjs} +1 -1
- package/dist/shared/{better-auth.fDN2zET_.mjs → better-auth.DXxLjRIn.mjs} +2 -1
- package/dist/shared/{better-auth.BY1-gjw3.mjs → better-auth.I6rKDlAU.mjs} +26 -10
- package/dist/shared/{better-auth.DkJw4zNh.mjs → better-auth.djzHi0X3.mjs} +2 -2
- package/dist/social-providers/index.cjs +1 -1
- package/dist/social-providers/index.mjs +1 -1
- package/dist/test-utils/index.cjs +3 -3
- package/dist/test-utils/index.mjs +3 -3
- 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 socialProviders_index = require('../shared/better-auth.
|
|
4
|
+
const socialProviders_index = require('../shared/better-auth.BmvbW_9e.cjs');
|
|
5
5
|
const z = require('zod/v4');
|
|
6
6
|
const cookies_index = require('../cookies/index.cjs');
|
|
7
7
|
const schema = require('../shared/better-auth.BIMq4RPW.cjs');
|
package/dist/api/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { APIError, createRouter } from 'better-call';
|
|
2
2
|
export { APIError } from 'better-call';
|
|
3
|
-
import { j as createAuthEndpoint, B as BASE_ERROR_CODES, t as createEmailVerificationToken, w as wildcardMatch, u as listSessions, x as updateUser, m as getSession, y as toAuthEndpoints, z as originCheckMiddleware, A as error, C as ok, D as accountInfo, E as getAccessToken, F as refreshToken, G as unlinkAccount, I as deleteUserCallback, J as listUserAccounts, K as linkSocialAccount, L as revokeOtherSessions, M as revokeSessions, N as revokeSession, O as requestPasswordResetCallback, P as requestPasswordReset, Q as forgetPasswordCallback, R as deleteUser, S as setPassword, T as changePassword, U as changeEmail, V as sendVerificationEmail, W as verifyEmail, X as resetPassword, Y as forgetPassword, Z as signInEmail, _ as signOut, $ as callbackOAuth, a0 as signInSocial } from '../shared/better-auth.
|
|
4
|
-
export { i as createAuthMiddleware, n as freshSessionMiddleware, k as getSessionFromCtx, q as optionsMiddleware, o as originCheck, a1 as requestOnlySessionMiddleware, a2 as sendVerificationEmailFn, l as sessionMiddleware } from '../shared/better-auth.
|
|
3
|
+
import { j as createAuthEndpoint, B as BASE_ERROR_CODES, t as createEmailVerificationToken, w as wildcardMatch, u as listSessions, x as updateUser, m as getSession, y as toAuthEndpoints, z as originCheckMiddleware, A as error, C as ok, D as accountInfo, E as getAccessToken, F as refreshToken, G as unlinkAccount, I as deleteUserCallback, J as listUserAccounts, K as linkSocialAccount, L as revokeOtherSessions, M as revokeSessions, N as revokeSession, O as requestPasswordResetCallback, P as requestPasswordReset, Q as forgetPasswordCallback, R as deleteUser, S as setPassword, T as changePassword, U as changeEmail, V as sendVerificationEmail, W as verifyEmail, X as resetPassword, Y as forgetPassword, Z as signInEmail, _ as signOut, $ as callbackOAuth, a0 as signInSocial } from '../shared/better-auth.DXxLjRIn.mjs';
|
|
4
|
+
export { i as createAuthMiddleware, n as freshSessionMiddleware, k as getSessionFromCtx, q as optionsMiddleware, o as originCheck, a1 as requestOnlySessionMiddleware, a2 as sendVerificationEmailFn, l as sessionMiddleware } from '../shared/better-auth.DXxLjRIn.mjs';
|
|
5
5
|
import * as z from 'zod/v4';
|
|
6
6
|
import { setSessionCookie } from '../cookies/index.mjs';
|
|
7
7
|
import { f as parseUserInput } from '../shared/better-auth.n2KFGwjY.mjs';
|
|
@@ -21,7 +21,7 @@ import { emailOTP } from '../../plugins/email-otp/index.cjs';
|
|
|
21
21
|
import { S as Store } from '../../shared/better-auth.Flh6HfYx.cjs';
|
|
22
22
|
import { sso } from '../../plugins/sso/index.cjs';
|
|
23
23
|
import { oidcProvider } from '../../plugins/oidc-provider/index.cjs';
|
|
24
|
-
import { a as apiKey } from '../../shared/better-auth.
|
|
24
|
+
import { a as apiKey } from '../../shared/better-auth.20-VDNhc.cjs';
|
|
25
25
|
import { oneTimeToken } from '../../plugins/one-time-token/index.cjs';
|
|
26
26
|
import { siwe } from '../../plugins/siwe/index.cjs';
|
|
27
27
|
export * from '@simplewebauthn/server';
|
|
@@ -21,7 +21,7 @@ import { emailOTP } from '../../plugins/email-otp/index.mjs';
|
|
|
21
21
|
import { S as Store } from '../../shared/better-auth.xbhp_NfZ.mjs';
|
|
22
22
|
import { sso } from '../../plugins/sso/index.mjs';
|
|
23
23
|
import { oidcProvider } from '../../plugins/oidc-provider/index.mjs';
|
|
24
|
-
import { a as apiKey } from '../../shared/better-auth.
|
|
24
|
+
import { a as apiKey } from '../../shared/better-auth.CqQYJ6k0.mjs';
|
|
25
25
|
import { oneTimeToken } from '../../plugins/one-time-token/index.mjs';
|
|
26
26
|
import { siwe } from '../../plugins/siwe/index.mjs';
|
|
27
27
|
export * from '@simplewebauthn/server';
|
|
@@ -21,7 +21,7 @@ import { emailOTP } from '../../plugins/email-otp/index.js';
|
|
|
21
21
|
import { S as Store } from '../../shared/better-auth.V3OT3rVi.js';
|
|
22
22
|
import { sso } from '../../plugins/sso/index.js';
|
|
23
23
|
import { oidcProvider } from '../../plugins/oidc-provider/index.js';
|
|
24
|
-
import { a as apiKey } from '../../shared/better-auth.
|
|
24
|
+
import { a as apiKey } from '../../shared/better-auth.BZCIev3z.js';
|
|
25
25
|
import { oneTimeToken } from '../../plugins/one-time-token/index.js';
|
|
26
26
|
import { siwe } from '../../plugins/siwe/index.js';
|
|
27
27
|
export * from '@simplewebauthn/server';
|
|
@@ -68,15 +68,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
68
68
|
data: InferClientAPI<Option> extends {
|
|
69
69
|
getSession: () => Promise<infer Res>;
|
|
70
70
|
} ? Res extends {
|
|
71
|
-
data: infer S;
|
|
72
|
-
error: null;
|
|
73
|
-
} | {
|
|
74
71
|
data: null;
|
|
75
72
|
error: {
|
|
76
73
|
message?: string | undefined;
|
|
77
74
|
status: number;
|
|
78
75
|
statusText: string;
|
|
79
76
|
};
|
|
77
|
+
} | {
|
|
78
|
+
data: infer S;
|
|
79
|
+
error: null;
|
|
80
80
|
} ? S : Res : never;
|
|
81
81
|
isPending: boolean;
|
|
82
82
|
error: BetterFetchError | null;
|
|
@@ -86,15 +86,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
86
86
|
Session: NonNullable<InferClientAPI<Option> extends {
|
|
87
87
|
getSession: () => Promise<infer Res>;
|
|
88
88
|
} ? Res extends {
|
|
89
|
-
data: infer S;
|
|
90
|
-
error: null;
|
|
91
|
-
} | {
|
|
92
89
|
data: null;
|
|
93
90
|
error: {
|
|
94
91
|
message?: string | undefined;
|
|
95
92
|
status: number;
|
|
96
93
|
statusText: string;
|
|
97
94
|
};
|
|
95
|
+
} | {
|
|
96
|
+
data: infer S;
|
|
97
|
+
error: null;
|
|
98
98
|
} ? S : Res : never>;
|
|
99
99
|
};
|
|
100
100
|
$fetch: _better_fetch_fetch.BetterFetch<{
|
|
@@ -68,15 +68,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
68
68
|
data: InferClientAPI<Option> extends {
|
|
69
69
|
getSession: () => Promise<infer Res>;
|
|
70
70
|
} ? Res extends {
|
|
71
|
-
data: infer S;
|
|
72
|
-
error: null;
|
|
73
|
-
} | {
|
|
74
71
|
data: null;
|
|
75
72
|
error: {
|
|
76
73
|
message?: string | undefined;
|
|
77
74
|
status: number;
|
|
78
75
|
statusText: string;
|
|
79
76
|
};
|
|
77
|
+
} | {
|
|
78
|
+
data: infer S;
|
|
79
|
+
error: null;
|
|
80
80
|
} ? S : Res : never;
|
|
81
81
|
isPending: boolean;
|
|
82
82
|
error: BetterFetchError | null;
|
|
@@ -86,15 +86,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
86
86
|
Session: NonNullable<InferClientAPI<Option> extends {
|
|
87
87
|
getSession: () => Promise<infer Res>;
|
|
88
88
|
} ? Res extends {
|
|
89
|
-
data: infer S;
|
|
90
|
-
error: null;
|
|
91
|
-
} | {
|
|
92
89
|
data: null;
|
|
93
90
|
error: {
|
|
94
91
|
message?: string | undefined;
|
|
95
92
|
status: number;
|
|
96
93
|
statusText: string;
|
|
97
94
|
};
|
|
95
|
+
} | {
|
|
96
|
+
data: infer S;
|
|
97
|
+
error: null;
|
|
98
98
|
} ? S : Res : never>;
|
|
99
99
|
};
|
|
100
100
|
$fetch: _better_fetch_fetch.BetterFetch<{
|
|
@@ -68,15 +68,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
68
68
|
data: InferClientAPI<Option> extends {
|
|
69
69
|
getSession: () => Promise<infer Res>;
|
|
70
70
|
} ? Res extends {
|
|
71
|
-
data: infer S;
|
|
72
|
-
error: null;
|
|
73
|
-
} | {
|
|
74
71
|
data: null;
|
|
75
72
|
error: {
|
|
76
73
|
message?: string | undefined;
|
|
77
74
|
status: number;
|
|
78
75
|
statusText: string;
|
|
79
76
|
};
|
|
77
|
+
} | {
|
|
78
|
+
data: infer S;
|
|
79
|
+
error: null;
|
|
80
80
|
} ? S : Res : never;
|
|
81
81
|
isPending: boolean;
|
|
82
82
|
error: BetterFetchError | null;
|
|
@@ -86,15 +86,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
86
86
|
Session: NonNullable<InferClientAPI<Option> extends {
|
|
87
87
|
getSession: () => Promise<infer Res>;
|
|
88
88
|
} ? Res extends {
|
|
89
|
-
data: infer S;
|
|
90
|
-
error: null;
|
|
91
|
-
} | {
|
|
92
89
|
data: null;
|
|
93
90
|
error: {
|
|
94
91
|
message?: string | undefined;
|
|
95
92
|
status: number;
|
|
96
93
|
statusText: string;
|
|
97
94
|
};
|
|
95
|
+
} | {
|
|
96
|
+
data: infer S;
|
|
97
|
+
error: null;
|
|
98
98
|
} ? S : Res : never>;
|
|
99
99
|
};
|
|
100
100
|
$fetch: _better_fetch_fetch.BetterFetch<{
|
|
@@ -26,15 +26,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
26
26
|
data: InferClientAPI<Option> extends {
|
|
27
27
|
getSession: () => Promise<infer Res>;
|
|
28
28
|
} ? Res extends {
|
|
29
|
+
data: infer S;
|
|
30
|
+
error: null;
|
|
31
|
+
} | {
|
|
29
32
|
data: null;
|
|
30
33
|
error: {
|
|
31
34
|
message?: string | undefined;
|
|
32
35
|
status: number;
|
|
33
36
|
statusText: string;
|
|
34
37
|
};
|
|
35
|
-
} | {
|
|
36
|
-
data: infer S;
|
|
37
|
-
error: null;
|
|
38
38
|
} ? S : Res extends Record<string, any> ? Res : never : never;
|
|
39
39
|
isPending: boolean;
|
|
40
40
|
isRefetching: boolean;
|
|
@@ -44,15 +44,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
44
44
|
data: Ref<InferClientAPI<Option> extends {
|
|
45
45
|
getSession: () => Promise<infer Res>;
|
|
46
46
|
} ? Res extends {
|
|
47
|
+
data: infer S;
|
|
48
|
+
error: null;
|
|
49
|
+
} | {
|
|
47
50
|
data: null;
|
|
48
51
|
error: {
|
|
49
52
|
message?: string | undefined;
|
|
50
53
|
status: number;
|
|
51
54
|
statusText: string;
|
|
52
55
|
};
|
|
53
|
-
} | {
|
|
54
|
-
data: infer S;
|
|
55
|
-
error: null;
|
|
56
56
|
} ? S : Res extends Record<string, any> ? Res : never : never>;
|
|
57
57
|
isPending: false;
|
|
58
58
|
error: Ref<{
|
|
@@ -66,15 +66,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
66
66
|
Session: NonNullable<InferClientAPI<Option> extends {
|
|
67
67
|
getSession: () => Promise<infer Res>;
|
|
68
68
|
} ? Res extends {
|
|
69
|
+
data: infer S;
|
|
70
|
+
error: null;
|
|
71
|
+
} | {
|
|
69
72
|
data: null;
|
|
70
73
|
error: {
|
|
71
74
|
message?: string | undefined;
|
|
72
75
|
status: number;
|
|
73
76
|
statusText: string;
|
|
74
77
|
};
|
|
75
|
-
} | {
|
|
76
|
-
data: infer S;
|
|
77
|
-
error: null;
|
|
78
78
|
} ? S : Res extends Record<string, any> ? Res : never : never>;
|
|
79
79
|
};
|
|
80
80
|
$fetch: _better_fetch_fetch.BetterFetch<{
|
|
@@ -26,15 +26,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
26
26
|
data: InferClientAPI<Option> extends {
|
|
27
27
|
getSession: () => Promise<infer Res>;
|
|
28
28
|
} ? Res extends {
|
|
29
|
+
data: infer S;
|
|
30
|
+
error: null;
|
|
31
|
+
} | {
|
|
29
32
|
data: null;
|
|
30
33
|
error: {
|
|
31
34
|
message?: string | undefined;
|
|
32
35
|
status: number;
|
|
33
36
|
statusText: string;
|
|
34
37
|
};
|
|
35
|
-
} | {
|
|
36
|
-
data: infer S;
|
|
37
|
-
error: null;
|
|
38
38
|
} ? S : Res extends Record<string, any> ? Res : never : never;
|
|
39
39
|
isPending: boolean;
|
|
40
40
|
isRefetching: boolean;
|
|
@@ -44,15 +44,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
44
44
|
data: Ref<InferClientAPI<Option> extends {
|
|
45
45
|
getSession: () => Promise<infer Res>;
|
|
46
46
|
} ? Res extends {
|
|
47
|
+
data: infer S;
|
|
48
|
+
error: null;
|
|
49
|
+
} | {
|
|
47
50
|
data: null;
|
|
48
51
|
error: {
|
|
49
52
|
message?: string | undefined;
|
|
50
53
|
status: number;
|
|
51
54
|
statusText: string;
|
|
52
55
|
};
|
|
53
|
-
} | {
|
|
54
|
-
data: infer S;
|
|
55
|
-
error: null;
|
|
56
56
|
} ? S : Res extends Record<string, any> ? Res : never : never>;
|
|
57
57
|
isPending: false;
|
|
58
58
|
error: Ref<{
|
|
@@ -66,15 +66,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
66
66
|
Session: NonNullable<InferClientAPI<Option> extends {
|
|
67
67
|
getSession: () => Promise<infer Res>;
|
|
68
68
|
} ? Res extends {
|
|
69
|
+
data: infer S;
|
|
70
|
+
error: null;
|
|
71
|
+
} | {
|
|
69
72
|
data: null;
|
|
70
73
|
error: {
|
|
71
74
|
message?: string | undefined;
|
|
72
75
|
status: number;
|
|
73
76
|
statusText: string;
|
|
74
77
|
};
|
|
75
|
-
} | {
|
|
76
|
-
data: infer S;
|
|
77
|
-
error: null;
|
|
78
78
|
} ? S : Res extends Record<string, any> ? Res : never : never>;
|
|
79
79
|
};
|
|
80
80
|
$fetch: _better_fetch_fetch.BetterFetch<{
|
|
@@ -26,15 +26,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
26
26
|
data: InferClientAPI<Option> extends {
|
|
27
27
|
getSession: () => Promise<infer Res>;
|
|
28
28
|
} ? Res extends {
|
|
29
|
+
data: infer S;
|
|
30
|
+
error: null;
|
|
31
|
+
} | {
|
|
29
32
|
data: null;
|
|
30
33
|
error: {
|
|
31
34
|
message?: string | undefined;
|
|
32
35
|
status: number;
|
|
33
36
|
statusText: string;
|
|
34
37
|
};
|
|
35
|
-
} | {
|
|
36
|
-
data: infer S;
|
|
37
|
-
error: null;
|
|
38
38
|
} ? S : Res extends Record<string, any> ? Res : never : never;
|
|
39
39
|
isPending: boolean;
|
|
40
40
|
isRefetching: boolean;
|
|
@@ -44,15 +44,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
44
44
|
data: Ref<InferClientAPI<Option> extends {
|
|
45
45
|
getSession: () => Promise<infer Res>;
|
|
46
46
|
} ? Res extends {
|
|
47
|
+
data: infer S;
|
|
48
|
+
error: null;
|
|
49
|
+
} | {
|
|
47
50
|
data: null;
|
|
48
51
|
error: {
|
|
49
52
|
message?: string | undefined;
|
|
50
53
|
status: number;
|
|
51
54
|
statusText: string;
|
|
52
55
|
};
|
|
53
|
-
} | {
|
|
54
|
-
data: infer S;
|
|
55
|
-
error: null;
|
|
56
56
|
} ? S : Res extends Record<string, any> ? Res : never : never>;
|
|
57
57
|
isPending: false;
|
|
58
58
|
error: Ref<{
|
|
@@ -66,15 +66,15 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
|
|
|
66
66
|
Session: NonNullable<InferClientAPI<Option> extends {
|
|
67
67
|
getSession: () => Promise<infer Res>;
|
|
68
68
|
} ? Res extends {
|
|
69
|
+
data: infer S;
|
|
70
|
+
error: null;
|
|
71
|
+
} | {
|
|
69
72
|
data: null;
|
|
70
73
|
error: {
|
|
71
74
|
message?: string | undefined;
|
|
72
75
|
status: number;
|
|
73
76
|
statusText: string;
|
|
74
77
|
};
|
|
75
|
-
} | {
|
|
76
|
-
data: infer S;
|
|
77
|
-
error: null;
|
|
78
78
|
} ? S : Res extends Record<string, any> ? Res : never : never>;
|
|
79
79
|
};
|
|
80
80
|
$fetch: _better_fetch_fetch.BetterFetch<{
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const auth = require('./shared/better-auth.
|
|
3
|
+
const auth = require('./shared/better-auth.BfrrzKqK.cjs');
|
|
4
4
|
const index = require('./shared/better-auth.ANpbi45u.cjs');
|
|
5
5
|
const misc = require('./shared/better-auth.BLDOwz3i.cjs');
|
|
6
|
-
const socialProviders_index = require('./shared/better-auth.
|
|
6
|
+
const socialProviders_index = require('./shared/better-auth.BmvbW_9e.cjs');
|
|
7
7
|
const logger = require('./shared/better-auth.CXhVNgXP.cjs');
|
|
8
8
|
require('./api/index.cjs');
|
|
9
9
|
require('better-call');
|
package/dist/index.d.cts
CHANGED
|
@@ -82,7 +82,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
82
82
|
disableSignUp: boolean | undefined;
|
|
83
83
|
getUserInfo: boolean;
|
|
84
84
|
overrideUserInfoOnSignIn: boolean;
|
|
85
|
-
prompt: "
|
|
85
|
+
prompt: "none" | "select_account" | "consent" | "login" | "select_account+consent" | undefined;
|
|
86
86
|
verifyIdToken: boolean;
|
|
87
87
|
scope: string[] | undefined;
|
|
88
88
|
refreshAccessToken: boolean;
|
|
@@ -90,7 +90,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
90
90
|
plugins: string[] | undefined;
|
|
91
91
|
user: {
|
|
92
92
|
modelName: string | undefined;
|
|
93
|
-
fields: Partial<Record<"
|
|
93
|
+
fields: Partial<Record<"createdAt" | "updatedAt" | "email" | "emailVerified" | "name" | "image", string>> | undefined;
|
|
94
94
|
additionalFields: {
|
|
95
95
|
[key: string]: FieldAttribute;
|
|
96
96
|
} | undefined;
|
|
@@ -115,7 +115,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
115
115
|
};
|
|
116
116
|
disableSessionRefresh: boolean | undefined;
|
|
117
117
|
expiresIn: number | undefined;
|
|
118
|
-
fields: Partial<Record<"
|
|
118
|
+
fields: Partial<Record<"userId" | "expiresAt" | "createdAt" | "updatedAt" | "token" | "ipAddress" | "userAgent", string>> | undefined;
|
|
119
119
|
freshAge: number | undefined;
|
|
120
120
|
preserveSessionInDatabase: boolean | undefined;
|
|
121
121
|
storeSessionInDatabase: boolean | undefined;
|
|
@@ -123,7 +123,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
123
123
|
};
|
|
124
124
|
account: {
|
|
125
125
|
modelName: string | undefined;
|
|
126
|
-
fields: Partial<Record<"
|
|
126
|
+
fields: Partial<Record<"userId" | "createdAt" | "updatedAt" | "scope" | "idToken" | "accessToken" | "refreshToken" | "providerId" | "accountId" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "password", string>> | undefined;
|
|
127
127
|
encryptOAuthTokens: boolean | undefined;
|
|
128
128
|
updateAccountOnSignIn: boolean | undefined;
|
|
129
129
|
accountLinking: {
|
|
@@ -163,7 +163,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
163
163
|
cookieAttributes: {
|
|
164
164
|
expires: Date | undefined;
|
|
165
165
|
secure: boolean | undefined;
|
|
166
|
-
sameSite: "
|
|
166
|
+
sameSite: "lax" | "Strict" | "Lax" | "None" | "strict" | "none" | undefined;
|
|
167
167
|
domain: boolean;
|
|
168
168
|
path: string | undefined;
|
|
169
169
|
httpOnly: boolean | undefined;
|
package/dist/index.d.mts
CHANGED
|
@@ -82,7 +82,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
82
82
|
disableSignUp: boolean | undefined;
|
|
83
83
|
getUserInfo: boolean;
|
|
84
84
|
overrideUserInfoOnSignIn: boolean;
|
|
85
|
-
prompt: "
|
|
85
|
+
prompt: "none" | "select_account" | "consent" | "login" | "select_account+consent" | undefined;
|
|
86
86
|
verifyIdToken: boolean;
|
|
87
87
|
scope: string[] | undefined;
|
|
88
88
|
refreshAccessToken: boolean;
|
|
@@ -90,7 +90,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
90
90
|
plugins: string[] | undefined;
|
|
91
91
|
user: {
|
|
92
92
|
modelName: string | undefined;
|
|
93
|
-
fields: Partial<Record<"
|
|
93
|
+
fields: Partial<Record<"createdAt" | "updatedAt" | "email" | "emailVerified" | "name" | "image", string>> | undefined;
|
|
94
94
|
additionalFields: {
|
|
95
95
|
[key: string]: FieldAttribute;
|
|
96
96
|
} | undefined;
|
|
@@ -115,7 +115,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
115
115
|
};
|
|
116
116
|
disableSessionRefresh: boolean | undefined;
|
|
117
117
|
expiresIn: number | undefined;
|
|
118
|
-
fields: Partial<Record<"
|
|
118
|
+
fields: Partial<Record<"userId" | "expiresAt" | "createdAt" | "updatedAt" | "token" | "ipAddress" | "userAgent", string>> | undefined;
|
|
119
119
|
freshAge: number | undefined;
|
|
120
120
|
preserveSessionInDatabase: boolean | undefined;
|
|
121
121
|
storeSessionInDatabase: boolean | undefined;
|
|
@@ -123,7 +123,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
123
123
|
};
|
|
124
124
|
account: {
|
|
125
125
|
modelName: string | undefined;
|
|
126
|
-
fields: Partial<Record<"
|
|
126
|
+
fields: Partial<Record<"userId" | "createdAt" | "updatedAt" | "scope" | "idToken" | "accessToken" | "refreshToken" | "providerId" | "accountId" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "password", string>> | undefined;
|
|
127
127
|
encryptOAuthTokens: boolean | undefined;
|
|
128
128
|
updateAccountOnSignIn: boolean | undefined;
|
|
129
129
|
accountLinking: {
|
|
@@ -163,7 +163,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
163
163
|
cookieAttributes: {
|
|
164
164
|
expires: Date | undefined;
|
|
165
165
|
secure: boolean | undefined;
|
|
166
|
-
sameSite: "
|
|
166
|
+
sameSite: "lax" | "Strict" | "Lax" | "None" | "strict" | "none" | undefined;
|
|
167
167
|
domain: boolean;
|
|
168
168
|
path: string | undefined;
|
|
169
169
|
httpOnly: boolean | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -82,7 +82,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
82
82
|
disableSignUp: boolean | undefined;
|
|
83
83
|
getUserInfo: boolean;
|
|
84
84
|
overrideUserInfoOnSignIn: boolean;
|
|
85
|
-
prompt: "
|
|
85
|
+
prompt: "none" | "select_account" | "consent" | "login" | "select_account+consent" | undefined;
|
|
86
86
|
verifyIdToken: boolean;
|
|
87
87
|
scope: string[] | undefined;
|
|
88
88
|
refreshAccessToken: boolean;
|
|
@@ -90,7 +90,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
90
90
|
plugins: string[] | undefined;
|
|
91
91
|
user: {
|
|
92
92
|
modelName: string | undefined;
|
|
93
|
-
fields: Partial<Record<"
|
|
93
|
+
fields: Partial<Record<"createdAt" | "updatedAt" | "email" | "emailVerified" | "name" | "image", string>> | undefined;
|
|
94
94
|
additionalFields: {
|
|
95
95
|
[key: string]: FieldAttribute;
|
|
96
96
|
} | undefined;
|
|
@@ -115,7 +115,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
115
115
|
};
|
|
116
116
|
disableSessionRefresh: boolean | undefined;
|
|
117
117
|
expiresIn: number | undefined;
|
|
118
|
-
fields: Partial<Record<"
|
|
118
|
+
fields: Partial<Record<"userId" | "expiresAt" | "createdAt" | "updatedAt" | "token" | "ipAddress" | "userAgent", string>> | undefined;
|
|
119
119
|
freshAge: number | undefined;
|
|
120
120
|
preserveSessionInDatabase: boolean | undefined;
|
|
121
121
|
storeSessionInDatabase: boolean | undefined;
|
|
@@ -123,7 +123,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
123
123
|
};
|
|
124
124
|
account: {
|
|
125
125
|
modelName: string | undefined;
|
|
126
|
-
fields: Partial<Record<"
|
|
126
|
+
fields: Partial<Record<"userId" | "createdAt" | "updatedAt" | "scope" | "idToken" | "accessToken" | "refreshToken" | "providerId" | "accountId" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "password", string>> | undefined;
|
|
127
127
|
encryptOAuthTokens: boolean | undefined;
|
|
128
128
|
updateAccountOnSignIn: boolean | undefined;
|
|
129
129
|
accountLinking: {
|
|
@@ -163,7 +163,7 @@ declare function getTelemetryAuthConfig(options: BetterAuthOptions, context?: Te
|
|
|
163
163
|
cookieAttributes: {
|
|
164
164
|
expires: Date | undefined;
|
|
165
165
|
secure: boolean | undefined;
|
|
166
|
-
sameSite: "
|
|
166
|
+
sameSite: "lax" | "Strict" | "Lax" | "None" | "strict" | "none" | undefined;
|
|
167
167
|
domain: boolean;
|
|
168
168
|
path: string | undefined;
|
|
169
169
|
httpOnly: boolean | undefined;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { b as betterAuth, c as createTelemetry, g as getTelemetryAuthConfig } from './shared/better-auth.
|
|
1
|
+
export { b as betterAuth, c as createTelemetry, g as getTelemetryAuthConfig } from './shared/better-auth.I6rKDlAU.mjs';
|
|
2
2
|
export { B as BetterAuthError, M as MissingDependencyError } from './shared/better-auth.DdzSJf-n.mjs';
|
|
3
3
|
export { c as capitalizeFirstLetter } from './shared/better-auth.D-2CmEwz.mjs';
|
|
4
|
-
export { H as HIDE_METADATA, g as generateState, p as parseState } from './shared/better-auth.
|
|
4
|
+
export { H as HIDE_METADATA, g as generateState, p as parseState } from './shared/better-auth.DXxLjRIn.mjs';
|
|
5
5
|
export { c as createLogger, g as generateId, l as levels, a as logger, s as shouldPublishLog } from './shared/better-auth.DBGfIDnh.mjs';
|
|
6
6
|
import './api/index.mjs';
|
|
7
7
|
import 'better-call';
|
|
@@ -7,9 +7,9 @@ require('@better-auth/utils/binary');
|
|
|
7
7
|
const cookies_index = require('../cookies/index.cjs');
|
|
8
8
|
require('better-call');
|
|
9
9
|
require('zod/v4');
|
|
10
|
-
const socialProviders_index = require('../shared/better-auth.
|
|
10
|
+
const socialProviders_index = require('../shared/better-auth.BmvbW_9e.cjs');
|
|
11
11
|
require('../shared/better-auth.BIMq4RPW.cjs');
|
|
12
|
-
require('../shared/better-auth.
|
|
12
|
+
require('../shared/better-auth.D3o8uSQJ.cjs');
|
|
13
13
|
require('../plugins/organization/access/index.cjs');
|
|
14
14
|
require('@better-auth/utils/random');
|
|
15
15
|
require('@better-auth/utils/hash');
|
|
@@ -5,9 +5,9 @@ import '@better-auth/utils/binary';
|
|
|
5
5
|
import { parseSetCookieHeader } from '../cookies/index.mjs';
|
|
6
6
|
import 'better-call';
|
|
7
7
|
import 'zod/v4';
|
|
8
|
-
import { i as createAuthMiddleware } from '../shared/better-auth.
|
|
8
|
+
import { i as createAuthMiddleware } from '../shared/better-auth.DXxLjRIn.mjs';
|
|
9
9
|
import '../shared/better-auth.n2KFGwjY.mjs';
|
|
10
|
-
import '../shared/better-auth.
|
|
10
|
+
import '../shared/better-auth.Blf9suYs.mjs';
|
|
11
11
|
import '../plugins/organization/access/index.mjs';
|
|
12
12
|
import '@better-auth/utils/random';
|
|
13
13
|
import '@better-auth/utils/hash';
|
|
@@ -7,9 +7,9 @@ require('@better-auth/utils/binary');
|
|
|
7
7
|
const cookies_index = require('../cookies/index.cjs');
|
|
8
8
|
require('better-call');
|
|
9
9
|
require('zod/v4');
|
|
10
|
-
const socialProviders_index = require('../shared/better-auth.
|
|
10
|
+
const socialProviders_index = require('../shared/better-auth.BmvbW_9e.cjs');
|
|
11
11
|
require('../shared/better-auth.BIMq4RPW.cjs');
|
|
12
|
-
require('../shared/better-auth.
|
|
12
|
+
require('../shared/better-auth.D3o8uSQJ.cjs');
|
|
13
13
|
require('../plugins/organization/access/index.cjs');
|
|
14
14
|
require('@better-auth/utils/random');
|
|
15
15
|
require('@better-auth/utils/hash');
|
|
@@ -5,9 +5,9 @@ import '@better-auth/utils/binary';
|
|
|
5
5
|
import { parseSetCookieHeader } from '../cookies/index.mjs';
|
|
6
6
|
import 'better-call';
|
|
7
7
|
import 'zod/v4';
|
|
8
|
-
import { i as createAuthMiddleware } from '../shared/better-auth.
|
|
8
|
+
import { i as createAuthMiddleware } from '../shared/better-auth.DXxLjRIn.mjs';
|
|
9
9
|
import '../shared/better-auth.n2KFGwjY.mjs';
|
|
10
|
-
import '../shared/better-auth.
|
|
10
|
+
import '../shared/better-auth.Blf9suYs.mjs';
|
|
11
11
|
import '../plugins/organization/access/index.mjs';
|
|
12
12
|
import '@better-auth/utils/random';
|
|
13
13
|
import '@better-auth/utils/hash';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('better-call');
|
|
4
|
-
const socialProviders_index = require('../shared/better-auth.
|
|
4
|
+
const socialProviders_index = require('../shared/better-auth.BmvbW_9e.cjs');
|
|
5
5
|
require('zod/v4');
|
|
6
6
|
require('../shared/better-auth.B6fIklBU.cjs');
|
|
7
7
|
require('@better-auth/utils/base64');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'better-call';
|
|
2
|
-
import { i as createAuthMiddleware } from '../shared/better-auth.
|
|
2
|
+
import { i as createAuthMiddleware } from '../shared/better-auth.DXxLjRIn.mjs';
|
|
3
3
|
import 'zod/v4';
|
|
4
4
|
import '../shared/better-auth.CMQ3rA-I.mjs';
|
|
5
5
|
import '@better-auth/utils/base64';
|
package/dist/oauth2/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const socialProviders_index = require('../shared/better-auth.
|
|
3
|
+
const socialProviders_index = require('../shared/better-auth.BmvbW_9e.cjs');
|
|
4
4
|
require('zod/v4');
|
|
5
5
|
require('better-call');
|
|
6
6
|
require('../shared/better-auth.C1hdVENX.cjs');
|
package/dist/oauth2/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as createAuthorizationURL, f as decryptOAuthToken, e as encodeOAuthParameter, b as generateCodeChallenge, g as generateState, d as getOAuth2Tokens, h as handleOAuthUserInfo, p as parseState, r as refreshAccessToken, s as setTokenUtil, v as validateAuthorizationCode, a as validateToken } from '../shared/better-auth.
|
|
1
|
+
export { c as createAuthorizationURL, f as decryptOAuthToken, e as encodeOAuthParameter, b as generateCodeChallenge, g as generateState, d as getOAuth2Tokens, h as handleOAuthUserInfo, p as parseState, r as refreshAccessToken, s as setTokenUtil, v as validateAuthorizationCode, a as validateToken } from '../shared/better-auth.DXxLjRIn.mjs';
|
|
2
2
|
import 'zod/v4';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import '../shared/better-auth.CW6D9eSx.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const admin = require('../../shared/better-auth.
|
|
3
|
+
const admin = require('../../shared/better-auth.CpIqcmvR.cjs');
|
|
4
4
|
require('zod/v4');
|
|
5
5
|
require('better-call');
|
|
6
|
-
require('../../shared/better-auth.
|
|
6
|
+
require('../../shared/better-auth.BmvbW_9e.cjs');
|
|
7
7
|
require('../../shared/better-auth.C1hdVENX.cjs');
|
|
8
8
|
require('@better-auth/utils/hash');
|
|
9
9
|
require('@better-auth/utils/base64');
|
|
@@ -445,7 +445,7 @@ declare const admin: <O extends AdminOptions>(options?: O) => {
|
|
|
445
445
|
} & {
|
|
446
446
|
query: {
|
|
447
447
|
searchValue?: string | undefined;
|
|
448
|
-
searchField?: "
|
|
448
|
+
searchField?: "email" | "name" | undefined;
|
|
449
449
|
searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
|
|
450
450
|
limit?: string | number | undefined;
|
|
451
451
|
offset?: string | number | undefined;
|
|
@@ -500,8 +500,8 @@ declare const admin: <O extends AdminOptions>(options?: O) => {
|
|
|
500
500
|
query: z.ZodObject<{
|
|
501
501
|
searchValue: z.ZodOptional<z.ZodString>;
|
|
502
502
|
searchField: z.ZodOptional<z.ZodEnum<{
|
|
503
|
-
name: "name";
|
|
504
503
|
email: "email";
|
|
504
|
+
name: "name";
|
|
505
505
|
}>>;
|
|
506
506
|
searchOperator: z.ZodOptional<z.ZodEnum<{
|
|
507
507
|
contains: "contains";
|
|
@@ -1553,7 +1553,7 @@ declare const admin: <O extends AdminOptions>(options?: O) => {
|
|
|
1553
1553
|
};
|
|
1554
1554
|
$ERROR_CODES: {
|
|
1555
1555
|
readonly FAILED_TO_CREATE_USER: "Failed to create user";
|
|
1556
|
-
readonly USER_ALREADY_EXISTS: "User already exists";
|
|
1556
|
+
readonly USER_ALREADY_EXISTS: "User already exists. Use another email.";
|
|
1557
1557
|
readonly YOU_CANNOT_BAN_YOURSELF: "You cannot ban yourself";
|
|
1558
1558
|
readonly YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: "You are not allowed to change users role";
|
|
1559
1559
|
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: "You are not allowed to create users";
|