better-auth 1.4.0-beta.3 → 1.4.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/drizzle-adapter/index.d.cts +1 -1
- package/dist/adapters/drizzle-adapter/index.d.mts +1 -1
- package/dist/adapters/drizzle-adapter/index.d.ts +1 -1
- package/dist/adapters/index.d.cts +2 -2
- package/dist/adapters/index.d.mts +2 -2
- package/dist/adapters/index.d.ts +2 -2
- package/dist/adapters/kysely-adapter/index.d.cts +1 -1
- package/dist/adapters/kysely-adapter/index.d.mts +1 -1
- package/dist/adapters/kysely-adapter/index.d.ts +1 -1
- package/dist/adapters/memory-adapter/index.d.cts +1 -1
- package/dist/adapters/memory-adapter/index.d.mts +1 -1
- package/dist/adapters/memory-adapter/index.d.ts +1 -1
- package/dist/adapters/mongodb-adapter/index.d.cts +1 -1
- package/dist/adapters/mongodb-adapter/index.d.mts +1 -1
- package/dist/adapters/mongodb-adapter/index.d.ts +1 -1
- package/dist/adapters/prisma-adapter/index.d.cts +1 -1
- package/dist/adapters/prisma-adapter/index.d.mts +1 -1
- package/dist/adapters/prisma-adapter/index.d.ts +1 -1
- package/dist/adapters/test.d.cts +1 -1
- package/dist/adapters/test.d.mts +1 -1
- package/dist/adapters/test.d.ts +1 -1
- package/dist/api/index.cjs +7 -6
- package/dist/api/index.d.cts +1 -1
- package/dist/api/index.d.mts +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.mjs +9 -8
- package/dist/client/index.cjs +3 -3
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.mts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.mjs +3 -3
- package/dist/client/plugins/index.d.cts +3 -3
- package/dist/client/plugins/index.d.mts +3 -3
- package/dist/client/plugins/index.d.ts +3 -3
- package/dist/client/react/index.cjs +2 -2
- package/dist/client/react/index.d.cts +9 -9
- package/dist/client/react/index.d.mts +9 -9
- package/dist/client/react/index.d.ts +9 -9
- package/dist/client/react/index.mjs +2 -2
- package/dist/client/solid/index.cjs +2 -2
- package/dist/client/solid/index.d.cts +9 -9
- package/dist/client/solid/index.d.mts +9 -9
- package/dist/client/solid/index.d.ts +9 -9
- package/dist/client/solid/index.mjs +2 -2
- package/dist/client/svelte/index.cjs +2 -2
- package/dist/client/svelte/index.d.cts +3 -3
- package/dist/client/svelte/index.d.mts +3 -3
- package/dist/client/svelte/index.d.ts +3 -3
- package/dist/client/svelte/index.mjs +2 -2
- package/dist/client/vue/index.cjs +3 -3
- package/dist/client/vue/index.d.cts +3 -3
- package/dist/client/vue/index.d.mts +3 -3
- package/dist/client/vue/index.d.ts +3 -3
- package/dist/client/vue/index.mjs +3 -3
- package/dist/cookies/index.cjs +2 -2
- package/dist/cookies/index.d.cts +1 -1
- package/dist/cookies/index.d.mts +1 -1
- package/dist/cookies/index.d.ts +1 -1
- package/dist/cookies/index.mjs +2 -2
- package/dist/db/index.cjs +1 -1
- package/dist/db/index.d.cts +2 -2
- package/dist/db/index.d.mts +2 -2
- package/dist/db/index.d.ts +2 -2
- package/dist/db/index.mjs +1 -1
- package/dist/index.cjs +7 -6
- package/dist/index.d.cts +9 -9
- package/dist/index.d.mts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.mjs +7 -6
- package/dist/integrations/next-js.cjs +6 -5
- package/dist/integrations/next-js.d.cts +1 -1
- package/dist/integrations/next-js.d.mts +1 -1
- package/dist/integrations/next-js.d.ts +1 -1
- package/dist/integrations/next-js.mjs +6 -5
- package/dist/integrations/node.d.cts +1 -1
- package/dist/integrations/node.d.mts +1 -1
- package/dist/integrations/node.d.ts +1 -1
- package/dist/integrations/react-start.cjs +6 -5
- package/dist/integrations/react-start.d.cts +1 -1
- package/dist/integrations/react-start.d.mts +1 -1
- package/dist/integrations/react-start.d.ts +1 -1
- package/dist/integrations/react-start.mjs +6 -5
- package/dist/integrations/svelte-kit.cjs +5 -4
- package/dist/integrations/svelte-kit.d.cts +1 -1
- package/dist/integrations/svelte-kit.d.mts +1 -1
- package/dist/integrations/svelte-kit.d.ts +1 -1
- package/dist/integrations/svelte-kit.mjs +5 -4
- package/dist/oauth2/index.cjs +5 -4
- package/dist/oauth2/index.d.cts +2 -2
- package/dist/oauth2/index.d.mts +2 -2
- package/dist/oauth2/index.d.ts +2 -2
- package/dist/oauth2/index.mjs +5 -4
- package/dist/plugins/admin/index.cjs +6 -5
- package/dist/plugins/admin/index.d.cts +7 -6
- package/dist/plugins/admin/index.d.mts +7 -6
- package/dist/plugins/admin/index.d.ts +7 -6
- package/dist/plugins/admin/index.mjs +6 -5
- package/dist/plugins/anonymous/index.cjs +5 -4
- package/dist/plugins/anonymous/index.d.cts +1 -1
- package/dist/plugins/anonymous/index.d.mts +1 -1
- package/dist/plugins/anonymous/index.d.ts +1 -1
- package/dist/plugins/anonymous/index.mjs +5 -4
- package/dist/plugins/bearer/index.cjs +5 -4
- package/dist/plugins/bearer/index.d.cts +1 -1
- package/dist/plugins/bearer/index.d.mts +1 -1
- package/dist/plugins/bearer/index.d.ts +1 -1
- package/dist/plugins/bearer/index.mjs +5 -4
- package/dist/plugins/captcha/index.cjs +5 -4
- package/dist/plugins/captcha/index.d.cts +1 -1
- package/dist/plugins/captcha/index.d.mts +1 -1
- package/dist/plugins/captcha/index.d.ts +1 -1
- package/dist/plugins/captcha/index.mjs +5 -4
- package/dist/plugins/custom-session/index.cjs +11 -8
- package/dist/plugins/custom-session/index.d.cts +1 -1
- package/dist/plugins/custom-session/index.d.mts +1 -1
- package/dist/plugins/custom-session/index.d.ts +1 -1
- package/dist/plugins/custom-session/index.mjs +11 -8
- package/dist/plugins/device-authorization/index.cjs +52 -19
- package/dist/plugins/device-authorization/index.d.cts +1 -1
- package/dist/plugins/device-authorization/index.d.mts +1 -1
- package/dist/plugins/device-authorization/index.d.ts +1 -1
- package/dist/plugins/device-authorization/index.mjs +52 -19
- package/dist/plugins/email-otp/index.cjs +62 -21
- package/dist/plugins/email-otp/index.d.cts +1 -1
- package/dist/plugins/email-otp/index.d.mts +1 -1
- package/dist/plugins/email-otp/index.d.ts +1 -1
- package/dist/plugins/email-otp/index.mjs +62 -21
- package/dist/plugins/generic-oauth/index.cjs +44 -25
- package/dist/plugins/generic-oauth/index.d.cts +1 -1
- package/dist/plugins/generic-oauth/index.d.mts +1 -1
- package/dist/plugins/generic-oauth/index.d.ts +1 -1
- package/dist/plugins/generic-oauth/index.mjs +44 -25
- package/dist/plugins/haveibeenpwned/index.cjs +5 -4
- package/dist/plugins/haveibeenpwned/index.d.cts +1 -1
- package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
- package/dist/plugins/haveibeenpwned/index.d.ts +1 -1
- package/dist/plugins/haveibeenpwned/index.mjs +5 -4
- package/dist/plugins/index.cjs +11 -10
- package/dist/plugins/index.d.cts +6 -6
- package/dist/plugins/index.d.mts +6 -6
- package/dist/plugins/index.d.ts +6 -6
- package/dist/plugins/index.mjs +13 -12
- package/dist/plugins/jwt/index.cjs +5 -4
- package/dist/plugins/jwt/index.d.cts +1 -1
- package/dist/plugins/jwt/index.d.mts +1 -1
- package/dist/plugins/jwt/index.d.ts +1 -1
- package/dist/plugins/jwt/index.mjs +5 -4
- package/dist/plugins/magic-link/index.cjs +32 -21
- package/dist/plugins/magic-link/index.mjs +32 -21
- package/dist/plugins/multi-session/index.cjs +11 -6
- package/dist/plugins/multi-session/index.d.cts +1 -1
- package/dist/plugins/multi-session/index.d.mts +1 -1
- package/dist/plugins/multi-session/index.d.ts +1 -1
- package/dist/plugins/multi-session/index.mjs +11 -6
- package/dist/plugins/oauth-proxy/index.cjs +11 -6
- package/dist/plugins/oauth-proxy/index.d.cts +1 -1
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.d.ts +1 -1
- package/dist/plugins/oauth-proxy/index.mjs +11 -6
- package/dist/plugins/oidc-provider/index.cjs +6 -5
- package/dist/plugins/oidc-provider/index.d.cts +5 -5
- package/dist/plugins/oidc-provider/index.d.mts +5 -5
- package/dist/plugins/oidc-provider/index.d.ts +5 -5
- package/dist/plugins/oidc-provider/index.mjs +6 -5
- package/dist/plugins/one-tap/index.cjs +8 -7
- package/dist/plugins/one-tap/index.mjs +8 -7
- package/dist/plugins/one-time-token/index.cjs +7 -6
- package/dist/plugins/one-time-token/index.d.cts +1 -1
- package/dist/plugins/one-time-token/index.d.mts +1 -1
- package/dist/plugins/one-time-token/index.d.ts +1 -1
- package/dist/plugins/one-time-token/index.mjs +7 -6
- package/dist/plugins/open-api/index.cjs +5 -4
- package/dist/plugins/open-api/index.d.cts +1 -1
- package/dist/plugins/open-api/index.d.mts +1 -1
- package/dist/plugins/open-api/index.d.ts +1 -1
- package/dist/plugins/open-api/index.mjs +5 -4
- package/dist/plugins/organization/index.cjs +7 -6
- package/dist/plugins/organization/index.d.cts +9 -9
- package/dist/plugins/organization/index.d.mts +9 -9
- package/dist/plugins/organization/index.d.ts +9 -9
- package/dist/plugins/organization/index.mjs +7 -6
- package/dist/plugins/passkey/index.cjs +17 -12
- package/dist/plugins/passkey/index.d.cts +1 -1
- package/dist/plugins/passkey/index.d.mts +1 -1
- package/dist/plugins/passkey/index.d.ts +1 -1
- package/dist/plugins/passkey/index.mjs +17 -12
- package/dist/plugins/phone-number/index.cjs +41 -24
- package/dist/plugins/phone-number/index.d.cts +1 -1
- package/dist/plugins/phone-number/index.d.mts +1 -1
- package/dist/plugins/phone-number/index.d.ts +1 -1
- package/dist/plugins/phone-number/index.mjs +41 -24
- package/dist/plugins/siwe/index.cjs +5 -4
- package/dist/plugins/siwe/index.d.cts +1 -1
- package/dist/plugins/siwe/index.d.mts +1 -1
- package/dist/plugins/siwe/index.d.ts +1 -1
- package/dist/plugins/siwe/index.mjs +5 -4
- package/dist/plugins/sso/index.cjs +89 -62
- package/dist/plugins/sso/index.d.cts +3 -3
- package/dist/plugins/sso/index.d.mts +3 -3
- package/dist/plugins/sso/index.d.ts +3 -3
- package/dist/plugins/sso/index.mjs +89 -62
- package/dist/plugins/two-factor/index.cjs +50 -19
- package/dist/plugins/two-factor/index.d.cts +1 -1
- package/dist/plugins/two-factor/index.d.mts +1 -1
- package/dist/plugins/two-factor/index.d.ts +1 -1
- package/dist/plugins/two-factor/index.mjs +50 -19
- package/dist/plugins/username/index.cjs +18 -11
- package/dist/plugins/username/index.d.cts +19 -19
- package/dist/plugins/username/index.d.mts +19 -19
- package/dist/plugins/username/index.d.ts +19 -19
- package/dist/plugins/username/index.mjs +18 -11
- package/dist/shared/{better-auth.CuyhlHls.cjs → better-auth.1iHKsGdY.cjs} +2 -2
- package/dist/shared/{better-auth.DyZUF2_t.d.ts → better-auth.3es9ZU_K.d.ts} +36 -37
- package/dist/shared/{better-auth.COdnr6eY.cjs → better-auth.B2Bmtu6f.cjs} +83 -47
- package/dist/shared/{better-auth.T3Ux10v9.mjs → better-auth.BAPVOPl3.mjs} +3 -3
- package/dist/shared/{better-auth.DxV4YGX3.mjs → better-auth.BAQSo96z.mjs} +6 -4
- package/dist/shared/{better-auth.cXemjp2M.mjs → better-auth.BHwIy11H.mjs} +83 -47
- package/dist/shared/{better-auth.B1Za4fb4.d.cts → better-auth.BLDIAFp8.d.cts} +5 -5
- package/dist/shared/{better-auth.DHiuXI9L.d.cts → better-auth.BOKSn3AP.d.cts} +36 -37
- package/dist/shared/{better-auth.ZC_QEMLv.d.cts → better-auth.BW0VS3vZ.d.cts} +1 -1
- package/dist/shared/{better-auth.DXd8qaHd.mjs → better-auth.Bc2H_kPB.mjs} +54 -28
- package/dist/shared/{better-auth.DhQzyejE.mjs → better-auth.BoY6Vo7c.mjs} +1 -1
- package/dist/shared/{better-auth.D1jaLDAW.mjs → better-auth.C-9OPnjJ.mjs} +151 -71
- package/dist/shared/{better-auth.A_lT_4ey.cjs → better-auth.C0WkvM-b.cjs} +151 -71
- package/dist/shared/{better-auth.iE8wqp5_.cjs → better-auth.C2xLgiCv.cjs} +1 -1
- package/dist/shared/{better-auth.Cdkx1UlR.cjs → better-auth.C4gSFtQb.cjs} +54 -28
- package/dist/shared/{better-auth.D3u5pPGf.d.ts → better-auth.CAc8m5ps.d.ts} +1 -1
- package/dist/shared/{better-auth.BUqsHDoX.d.ts → better-auth.CBpfh9gd.d.ts} +1 -1
- package/dist/shared/{better-auth.BUmFH1YH.d.mts → better-auth.CHakYG_s.d.mts} +5 -5
- package/dist/shared/{better-auth.Co88PbP3.mjs → better-auth.CIqzVuC5.mjs} +15 -9
- package/dist/shared/{better-auth.DL28hkwE.mjs → better-auth.CJk6lu9H.mjs} +5 -5
- package/dist/shared/{better-auth.wBgaxGEw.cjs → better-auth.CWoe8tep.cjs} +15 -9
- package/dist/shared/{better-auth.TQtfFmwt.mjs → better-auth.Cs4ObP2J.mjs} +246 -139
- package/dist/shared/{better-auth.BftmE2f4.mjs → better-auth.Cw2Wb5xl.mjs} +2 -2
- package/dist/shared/{better-auth.BTmQo2-r.mjs → better-auth.CyhdLtgz.mjs} +122 -54
- package/dist/shared/{better-auth.Cn3gHKIq.d.ts → better-auth.D1mfnXw8.d.ts} +5 -5
- package/dist/shared/better-auth.D2xndZ2p.mjs +5 -0
- package/dist/shared/{better-auth.LBYUF6qL.d.mts → better-auth.D63GoHoT.d.mts} +1 -1
- package/dist/shared/{better-auth.DrO1u8u7.cjs → better-auth.DVpUemsq.cjs} +49 -10
- package/dist/shared/{better-auth.CYRK2rir.cjs → better-auth.DcLnIy5M.cjs} +122 -54
- package/dist/shared/{better-auth.B-RhOtHf.cjs → better-auth.Df7v65t4.cjs} +3 -3
- package/dist/shared/{better-auth.g25nv4YL.mjs → better-auth.DpE8ZxDZ.mjs} +49 -10
- package/dist/shared/{better-auth.8am3GyvS.d.cts → better-auth.DqouI_5s.d.cts} +1 -1
- package/dist/shared/{better-auth.DRmln2Nr.cjs → better-auth.DxBcELEX.cjs} +6 -4
- package/dist/shared/{better-auth.BSU7i7gN.cjs → better-auth.Fhb5xDFB.cjs} +5 -5
- package/dist/shared/{better-auth.CNhgW39t.cjs → better-auth.W6wY8Xk1.cjs} +246 -139
- package/dist/shared/{better-auth.DIfV2UBl.cjs → better-auth.oHfRlmfe.cjs} +1 -1
- package/dist/shared/{better-auth.C3bLnul-.mjs → better-auth.pyHheoY8.mjs} +1 -1
- package/dist/shared/better-auth.uykCWCYS.cjs +7 -0
- package/dist/shared/{better-auth.DQBMcFsm.d.mts → better-auth.vNMd9aBC.d.mts} +36 -37
- package/dist/shared/{better-auth.BC_XVl81.d.mts → better-auth.x83uJ-Ru.d.mts} +1 -1
- package/dist/social-providers/index.cjs +5 -4
- package/dist/social-providers/index.mjs +5 -4
- package/dist/test-utils/index.cjs +10 -9
- package/dist/test-utils/index.d.cts +59 -57
- package/dist/test-utils/index.d.mts +59 -57
- package/dist/test-utils/index.d.ts +59 -57
- package/dist/test-utils/index.mjs +10 -9
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +3 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
import 'better-call';
|
|
3
|
-
import '../../shared/better-auth.
|
|
4
|
-
import { a as createAuthEndpoint, c as createAuthMiddleware, b as getSession } from '../../shared/better-auth.
|
|
3
|
+
import '../../shared/better-auth.C-9OPnjJ.mjs';
|
|
4
|
+
import { a as createAuthEndpoint, c as createAuthMiddleware, b as getSession } from '../../shared/better-auth.CIqzVuC5.mjs';
|
|
5
5
|
import '../../shared/better-auth.CiuwFiHM.mjs';
|
|
6
6
|
import '@better-auth/utils/base64';
|
|
7
7
|
import '@better-auth/utils/hmac';
|
|
@@ -22,12 +22,13 @@ import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
|
22
22
|
import '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
23
23
|
import '@better-auth/utils/random';
|
|
24
24
|
import '@better-fetch/fetch';
|
|
25
|
-
import '../../shared/better-auth.
|
|
26
|
-
import '../../shared/better-auth.
|
|
25
|
+
import '../../shared/better-auth.BAQSo96z.mjs';
|
|
26
|
+
import '../../shared/better-auth.pyHheoY8.mjs';
|
|
27
27
|
import '../../shared/better-auth.CvNZNAOW.mjs';
|
|
28
28
|
import 'jose/errors';
|
|
29
29
|
import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
30
30
|
import 'defu';
|
|
31
|
+
import '../../shared/better-auth.D2xndZ2p.mjs';
|
|
31
32
|
|
|
32
33
|
const getSessionQuerySchema = z.optional(
|
|
33
34
|
z.object({
|
|
@@ -35,10 +36,12 @@ const getSessionQuerySchema = z.optional(
|
|
|
35
36
|
* If cookie cache is enabled, it will disable the cache
|
|
36
37
|
* and fetch the session from the database
|
|
37
38
|
*/
|
|
38
|
-
disableCookieCache: z.boolean().
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
).
|
|
39
|
+
disableCookieCache: z.boolean().meta({
|
|
40
|
+
description: "Disable cookie cache and fetch session from database"
|
|
41
|
+
}).or(z.string().transform((v) => v === "true")).optional(),
|
|
42
|
+
disableRefresh: z.boolean().meta({
|
|
43
|
+
description: "Disable session refresh. Useful for checking session status, without updating the session"
|
|
44
|
+
}).optional()
|
|
42
45
|
})
|
|
43
46
|
);
|
|
44
47
|
const customSession = (fn, options, pluginOptions) => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const z = require('zod');
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
|
-
const session = require('../../shared/better-auth.
|
|
5
|
+
const session = require('../../shared/better-auth.CWoe8tep.cjs');
|
|
6
6
|
require('@better-auth/utils/hash');
|
|
7
7
|
require('@noble/ciphers/chacha.js');
|
|
8
8
|
require('@noble/ciphers/utils.js');
|
|
@@ -12,7 +12,7 @@ require('@noble/hashes/scrypt.js');
|
|
|
12
12
|
require('@better-auth/utils/hex');
|
|
13
13
|
require('@noble/hashes/utils.js');
|
|
14
14
|
const random = require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
15
|
-
const cookies_index = require('../../shared/better-auth.
|
|
15
|
+
const cookies_index = require('../../shared/better-auth.oHfRlmfe.cjs');
|
|
16
16
|
const schema$1 = require('../../shared/better-auth.DcYLM7Us.cjs');
|
|
17
17
|
require('../../shared/better-auth.B6fIklBU.cjs');
|
|
18
18
|
require('../../shared/better-auth.DTvRBuq4.cjs');
|
|
@@ -21,10 +21,11 @@ require('kysely');
|
|
|
21
21
|
const client = require('../../shared/better-auth.BMgeJg3r.cjs');
|
|
22
22
|
require('../../shared/better-auth.C1hdVENX.cjs');
|
|
23
23
|
require('../../shared/better-auth.DgMx7bVs.cjs');
|
|
24
|
+
require('../../shared/better-auth.uykCWCYS.cjs');
|
|
24
25
|
require('@better-auth/utils/hmac');
|
|
25
26
|
require('@better-auth/utils/binary');
|
|
26
27
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
27
|
-
require('../../shared/better-auth.
|
|
28
|
+
require('../../shared/better-auth.DxBcELEX.cjs');
|
|
28
29
|
|
|
29
30
|
function _interopNamespaceCompat(e) {
|
|
30
31
|
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
@@ -197,12 +198,20 @@ const deviceAuthorization = (options = {}) => {
|
|
|
197
198
|
{
|
|
198
199
|
method: "POST",
|
|
199
200
|
body: z__namespace.object({
|
|
200
|
-
client_id: z__namespace.string().
|
|
201
|
-
|
|
201
|
+
client_id: z__namespace.string().meta({
|
|
202
|
+
description: "The client ID of the application"
|
|
203
|
+
}),
|
|
204
|
+
scope: z__namespace.string().meta({
|
|
205
|
+
description: "Space-separated list of scopes"
|
|
206
|
+
}).optional()
|
|
202
207
|
}),
|
|
203
208
|
error: z__namespace.object({
|
|
204
|
-
error: z__namespace.enum(["invalid_request", "invalid_client"]).
|
|
205
|
-
|
|
209
|
+
error: z__namespace.enum(["invalid_request", "invalid_client"]).meta({
|
|
210
|
+
description: "Error code"
|
|
211
|
+
}),
|
|
212
|
+
error_description: z__namespace.string().meta({
|
|
213
|
+
description: "Detailed error description"
|
|
214
|
+
})
|
|
206
215
|
}),
|
|
207
216
|
metadata: {
|
|
208
217
|
openapi: {
|
|
@@ -328,9 +337,15 @@ Follow [rfc8628#section-3.2](https://datatracker.ietf.org/doc/html/rfc8628#secti
|
|
|
328
337
|
{
|
|
329
338
|
method: "POST",
|
|
330
339
|
body: z__namespace.object({
|
|
331
|
-
grant_type: z__namespace.literal("urn:ietf:params:oauth:grant-type:device_code").
|
|
332
|
-
|
|
333
|
-
|
|
340
|
+
grant_type: z__namespace.literal("urn:ietf:params:oauth:grant-type:device_code").meta({
|
|
341
|
+
description: "The grant type for device flow"
|
|
342
|
+
}),
|
|
343
|
+
device_code: z__namespace.string().meta({
|
|
344
|
+
description: "The device verification code"
|
|
345
|
+
}),
|
|
346
|
+
client_id: z__namespace.string().meta({
|
|
347
|
+
description: "The client ID of the application"
|
|
348
|
+
})
|
|
334
349
|
}),
|
|
335
350
|
error: z__namespace.object({
|
|
336
351
|
error: z__namespace.enum([
|
|
@@ -340,8 +355,12 @@ Follow [rfc8628#section-3.2](https://datatracker.ietf.org/doc/html/rfc8628#secti
|
|
|
340
355
|
"access_denied",
|
|
341
356
|
"invalid_request",
|
|
342
357
|
"invalid_grant"
|
|
343
|
-
]).
|
|
344
|
-
|
|
358
|
+
]).meta({
|
|
359
|
+
description: "Error code"
|
|
360
|
+
}),
|
|
361
|
+
error_description: z__namespace.string().meta({
|
|
362
|
+
description: "Detailed error description"
|
|
363
|
+
})
|
|
345
364
|
}),
|
|
346
365
|
metadata: {
|
|
347
366
|
openapi: {
|
|
@@ -560,11 +579,17 @@ Follow [rfc8628#section-3.4](https://datatracker.ietf.org/doc/html/rfc8628#secti
|
|
|
560
579
|
{
|
|
561
580
|
method: "GET",
|
|
562
581
|
query: z__namespace.object({
|
|
563
|
-
user_code: z__namespace.string().
|
|
582
|
+
user_code: z__namespace.string().meta({
|
|
583
|
+
description: "The user code to verify"
|
|
584
|
+
})
|
|
564
585
|
}),
|
|
565
586
|
error: z__namespace.object({
|
|
566
|
-
error: z__namespace.enum(["invalid_request"]).
|
|
567
|
-
|
|
587
|
+
error: z__namespace.enum(["invalid_request"]).meta({
|
|
588
|
+
description: "Error code"
|
|
589
|
+
}),
|
|
590
|
+
error_description: z__namespace.string().meta({
|
|
591
|
+
description: "Detailed error description"
|
|
592
|
+
})
|
|
568
593
|
}),
|
|
569
594
|
metadata: {
|
|
570
595
|
openapi: {
|
|
@@ -630,15 +655,21 @@ Follow [rfc8628#section-3.4](https://datatracker.ietf.org/doc/html/rfc8628#secti
|
|
|
630
655
|
{
|
|
631
656
|
method: "POST",
|
|
632
657
|
body: z__namespace.object({
|
|
633
|
-
userCode: z__namespace.string().
|
|
658
|
+
userCode: z__namespace.string().meta({
|
|
659
|
+
description: "The user code to approve"
|
|
660
|
+
})
|
|
634
661
|
}),
|
|
635
662
|
error: z__namespace.object({
|
|
636
663
|
error: z__namespace.enum([
|
|
637
664
|
"invalid_request",
|
|
638
665
|
"expired_token",
|
|
639
666
|
"device_code_already_processed"
|
|
640
|
-
]).
|
|
641
|
-
|
|
667
|
+
]).meta({
|
|
668
|
+
description: "Error code"
|
|
669
|
+
}),
|
|
670
|
+
error_description: z__namespace.string().meta({
|
|
671
|
+
description: "Detailed error description"
|
|
672
|
+
})
|
|
642
673
|
}),
|
|
643
674
|
requireHeaders: true,
|
|
644
675
|
metadata: {
|
|
@@ -723,7 +754,9 @@ Follow [rfc8628#section-3.4](https://datatracker.ietf.org/doc/html/rfc8628#secti
|
|
|
723
754
|
{
|
|
724
755
|
method: "POST",
|
|
725
756
|
body: z__namespace.object({
|
|
726
|
-
userCode: z__namespace.string().
|
|
757
|
+
userCode: z__namespace.string().meta({
|
|
758
|
+
description: "The user code to deny"
|
|
759
|
+
})
|
|
727
760
|
}),
|
|
728
761
|
metadata: {
|
|
729
762
|
openapi: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import * as z from 'zod';
|
|
3
|
-
import { I as InferOptionSchema } from '../../shared/better-auth.
|
|
3
|
+
import { I as InferOptionSchema } from '../../shared/better-auth.BOKSn3AP.cjs';
|
|
4
4
|
import 'kysely';
|
|
5
5
|
import '../../shared/better-auth.v_lf-jeY.cjs';
|
|
6
6
|
import '../../shared/better-auth.DTtXpZYr.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import * as z from 'zod';
|
|
3
|
-
import { I as InferOptionSchema } from '../../shared/better-auth.
|
|
3
|
+
import { I as InferOptionSchema } from '../../shared/better-auth.vNMd9aBC.mjs';
|
|
4
4
|
import 'kysely';
|
|
5
5
|
import '../../shared/better-auth.XefKa8DI.mjs';
|
|
6
6
|
import '../../shared/better-auth.DTtXpZYr.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import * as z from 'zod';
|
|
3
|
-
import { I as InferOptionSchema } from '../../shared/better-auth.
|
|
3
|
+
import { I as InferOptionSchema } from '../../shared/better-auth.3es9ZU_K.js';
|
|
4
4
|
import 'kysely';
|
|
5
5
|
import '../../shared/better-auth.4SXCyo06.js';
|
|
6
6
|
import '../../shared/better-auth.DTtXpZYr.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
import { APIError } from '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.CIqzVuC5.mjs';
|
|
4
4
|
import '@better-auth/utils/hash';
|
|
5
5
|
import '@noble/ciphers/chacha.js';
|
|
6
6
|
import '@noble/ciphers/utils.js';
|
|
@@ -10,7 +10,7 @@ import '@noble/hashes/scrypt.js';
|
|
|
10
10
|
import '@better-auth/utils/hex';
|
|
11
11
|
import '@noble/hashes/utils.js';
|
|
12
12
|
import { g as generateRandomString } from '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
13
|
-
import { m as ms } from '../../shared/better-auth.
|
|
13
|
+
import { m as ms } from '../../shared/better-auth.pyHheoY8.mjs';
|
|
14
14
|
import { m as mergeSchema } from '../../shared/better-auth.CJ2rnsDV.mjs';
|
|
15
15
|
import '../../shared/better-auth.CiuwFiHM.mjs';
|
|
16
16
|
import '../../shared/better-auth.C4g12FAA.mjs';
|
|
@@ -19,10 +19,11 @@ import 'kysely';
|
|
|
19
19
|
export { d as deviceAuthorizationClient } from '../../shared/better-auth.BpA03GIs.mjs';
|
|
20
20
|
import '../../shared/better-auth.CW6D9eSx.mjs';
|
|
21
21
|
import '../../shared/better-auth.CvNZNAOW.mjs';
|
|
22
|
+
import '../../shared/better-auth.D2xndZ2p.mjs';
|
|
22
23
|
import '@better-auth/utils/hmac';
|
|
23
24
|
import '@better-auth/utils/binary';
|
|
24
25
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
25
|
-
import '../../shared/better-auth.
|
|
26
|
+
import '../../shared/better-auth.BAQSo96z.mjs';
|
|
26
27
|
|
|
27
28
|
const schema = {
|
|
28
29
|
deviceCode: {
|
|
@@ -181,12 +182,20 @@ const deviceAuthorization = (options = {}) => {
|
|
|
181
182
|
{
|
|
182
183
|
method: "POST",
|
|
183
184
|
body: z.object({
|
|
184
|
-
client_id: z.string().
|
|
185
|
-
|
|
185
|
+
client_id: z.string().meta({
|
|
186
|
+
description: "The client ID of the application"
|
|
187
|
+
}),
|
|
188
|
+
scope: z.string().meta({
|
|
189
|
+
description: "Space-separated list of scopes"
|
|
190
|
+
}).optional()
|
|
186
191
|
}),
|
|
187
192
|
error: z.object({
|
|
188
|
-
error: z.enum(["invalid_request", "invalid_client"]).
|
|
189
|
-
|
|
193
|
+
error: z.enum(["invalid_request", "invalid_client"]).meta({
|
|
194
|
+
description: "Error code"
|
|
195
|
+
}),
|
|
196
|
+
error_description: z.string().meta({
|
|
197
|
+
description: "Detailed error description"
|
|
198
|
+
})
|
|
190
199
|
}),
|
|
191
200
|
metadata: {
|
|
192
201
|
openapi: {
|
|
@@ -312,9 +321,15 @@ Follow [rfc8628#section-3.2](https://datatracker.ietf.org/doc/html/rfc8628#secti
|
|
|
312
321
|
{
|
|
313
322
|
method: "POST",
|
|
314
323
|
body: z.object({
|
|
315
|
-
grant_type: z.literal("urn:ietf:params:oauth:grant-type:device_code").
|
|
316
|
-
|
|
317
|
-
|
|
324
|
+
grant_type: z.literal("urn:ietf:params:oauth:grant-type:device_code").meta({
|
|
325
|
+
description: "The grant type for device flow"
|
|
326
|
+
}),
|
|
327
|
+
device_code: z.string().meta({
|
|
328
|
+
description: "The device verification code"
|
|
329
|
+
}),
|
|
330
|
+
client_id: z.string().meta({
|
|
331
|
+
description: "The client ID of the application"
|
|
332
|
+
})
|
|
318
333
|
}),
|
|
319
334
|
error: z.object({
|
|
320
335
|
error: z.enum([
|
|
@@ -324,8 +339,12 @@ Follow [rfc8628#section-3.2](https://datatracker.ietf.org/doc/html/rfc8628#secti
|
|
|
324
339
|
"access_denied",
|
|
325
340
|
"invalid_request",
|
|
326
341
|
"invalid_grant"
|
|
327
|
-
]).
|
|
328
|
-
|
|
342
|
+
]).meta({
|
|
343
|
+
description: "Error code"
|
|
344
|
+
}),
|
|
345
|
+
error_description: z.string().meta({
|
|
346
|
+
description: "Detailed error description"
|
|
347
|
+
})
|
|
329
348
|
}),
|
|
330
349
|
metadata: {
|
|
331
350
|
openapi: {
|
|
@@ -544,11 +563,17 @@ Follow [rfc8628#section-3.4](https://datatracker.ietf.org/doc/html/rfc8628#secti
|
|
|
544
563
|
{
|
|
545
564
|
method: "GET",
|
|
546
565
|
query: z.object({
|
|
547
|
-
user_code: z.string().
|
|
566
|
+
user_code: z.string().meta({
|
|
567
|
+
description: "The user code to verify"
|
|
568
|
+
})
|
|
548
569
|
}),
|
|
549
570
|
error: z.object({
|
|
550
|
-
error: z.enum(["invalid_request"]).
|
|
551
|
-
|
|
571
|
+
error: z.enum(["invalid_request"]).meta({
|
|
572
|
+
description: "Error code"
|
|
573
|
+
}),
|
|
574
|
+
error_description: z.string().meta({
|
|
575
|
+
description: "Detailed error description"
|
|
576
|
+
})
|
|
552
577
|
}),
|
|
553
578
|
metadata: {
|
|
554
579
|
openapi: {
|
|
@@ -614,15 +639,21 @@ Follow [rfc8628#section-3.4](https://datatracker.ietf.org/doc/html/rfc8628#secti
|
|
|
614
639
|
{
|
|
615
640
|
method: "POST",
|
|
616
641
|
body: z.object({
|
|
617
|
-
userCode: z.string().
|
|
642
|
+
userCode: z.string().meta({
|
|
643
|
+
description: "The user code to approve"
|
|
644
|
+
})
|
|
618
645
|
}),
|
|
619
646
|
error: z.object({
|
|
620
647
|
error: z.enum([
|
|
621
648
|
"invalid_request",
|
|
622
649
|
"expired_token",
|
|
623
650
|
"device_code_already_processed"
|
|
624
|
-
]).
|
|
625
|
-
|
|
651
|
+
]).meta({
|
|
652
|
+
description: "Error code"
|
|
653
|
+
}),
|
|
654
|
+
error_description: z.string().meta({
|
|
655
|
+
description: "Detailed error description"
|
|
656
|
+
})
|
|
626
657
|
}),
|
|
627
658
|
requireHeaders: true,
|
|
628
659
|
metadata: {
|
|
@@ -707,7 +738,9 @@ Follow [rfc8628#section-3.4](https://datatracker.ietf.org/doc/html/rfc8628#secti
|
|
|
707
738
|
{
|
|
708
739
|
method: "POST",
|
|
709
740
|
body: z.object({
|
|
710
|
-
userCode: z.string().
|
|
741
|
+
userCode: z.string().meta({
|
|
742
|
+
description: "The user code to deny"
|
|
743
|
+
})
|
|
711
744
|
}),
|
|
712
745
|
metadata: {
|
|
713
746
|
openapi: {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const z = require('zod');
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
|
-
require('../../shared/better-auth.
|
|
6
|
-
const session = require('../../shared/better-auth.
|
|
7
|
-
const cookies_index = require('../../shared/better-auth.
|
|
5
|
+
require('../../shared/better-auth.C0WkvM-b.cjs');
|
|
6
|
+
const session = require('../../shared/better-auth.CWoe8tep.cjs');
|
|
7
|
+
const cookies_index = require('../../shared/better-auth.oHfRlmfe.cjs');
|
|
8
8
|
require('../../shared/better-auth.DcYLM7Us.cjs');
|
|
9
9
|
require('../../shared/better-auth.B6fIklBU.cjs');
|
|
10
10
|
require('../../shared/better-auth.DTvRBuq4.cjs');
|
|
@@ -21,7 +21,7 @@ require('@noble/ciphers/utils.js');
|
|
|
21
21
|
require('@noble/hashes/scrypt.js');
|
|
22
22
|
require('@better-auth/utils/hex');
|
|
23
23
|
require('@noble/hashes/utils.js');
|
|
24
|
-
require('../../shared/better-auth.
|
|
24
|
+
require('../../shared/better-auth.DxBcELEX.cjs');
|
|
25
25
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
26
26
|
require('jose/errors');
|
|
27
27
|
require('@better-auth/utils/random');
|
|
@@ -30,6 +30,7 @@ require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
|
30
30
|
require('@better-auth/utils/hmac');
|
|
31
31
|
require('@better-auth/utils/binary');
|
|
32
32
|
require('defu');
|
|
33
|
+
require('../../shared/better-auth.uykCWCYS.cjs');
|
|
33
34
|
|
|
34
35
|
function _interopNamespaceCompat(e) {
|
|
35
36
|
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
@@ -139,8 +140,12 @@ const emailOTP = (options) => {
|
|
|
139
140
|
{
|
|
140
141
|
method: "POST",
|
|
141
142
|
body: z__namespace.object({
|
|
142
|
-
email: z__namespace.string({}).
|
|
143
|
-
|
|
143
|
+
email: z__namespace.string({}).meta({
|
|
144
|
+
description: "Email address to send the OTP"
|
|
145
|
+
}),
|
|
146
|
+
type: z__namespace.enum(types).meta({
|
|
147
|
+
description: "Type of the OTP"
|
|
148
|
+
})
|
|
144
149
|
}),
|
|
145
150
|
metadata: {
|
|
146
151
|
openapi: {
|
|
@@ -263,8 +268,13 @@ const emailOTP = (options) => {
|
|
|
263
268
|
{
|
|
264
269
|
method: "POST",
|
|
265
270
|
body: z__namespace.object({
|
|
266
|
-
email: z__namespace.string({}).
|
|
267
|
-
|
|
271
|
+
email: z__namespace.string({}).meta({
|
|
272
|
+
description: "Email address to send the OTP"
|
|
273
|
+
}),
|
|
274
|
+
type: z__namespace.enum(types).meta({
|
|
275
|
+
required: true,
|
|
276
|
+
description: "Type of the OTP"
|
|
277
|
+
})
|
|
268
278
|
}),
|
|
269
279
|
metadata: {
|
|
270
280
|
SERVER_ONLY: true,
|
|
@@ -317,8 +327,13 @@ const emailOTP = (options) => {
|
|
|
317
327
|
{
|
|
318
328
|
method: "GET",
|
|
319
329
|
query: z__namespace.object({
|
|
320
|
-
email: z__namespace.string({}).
|
|
321
|
-
|
|
330
|
+
email: z__namespace.string({}).meta({
|
|
331
|
+
description: "Email address the OTP was sent to"
|
|
332
|
+
}),
|
|
333
|
+
type: z__namespace.enum(types).meta({
|
|
334
|
+
required: true,
|
|
335
|
+
description: "Type of the OTP"
|
|
336
|
+
})
|
|
322
337
|
}),
|
|
323
338
|
metadata: {
|
|
324
339
|
SERVER_ONLY: true,
|
|
@@ -397,9 +412,17 @@ const emailOTP = (options) => {
|
|
|
397
412
|
{
|
|
398
413
|
method: "POST",
|
|
399
414
|
body: z__namespace.object({
|
|
400
|
-
email: z__namespace.string().
|
|
401
|
-
|
|
402
|
-
|
|
415
|
+
email: z__namespace.string().meta({
|
|
416
|
+
description: "Email address the OTP was sent to"
|
|
417
|
+
}),
|
|
418
|
+
type: z__namespace.enum(types).meta({
|
|
419
|
+
required: true,
|
|
420
|
+
description: "Type of the OTP"
|
|
421
|
+
}),
|
|
422
|
+
otp: z__namespace.string().meta({
|
|
423
|
+
required: true,
|
|
424
|
+
description: "OTP to verify"
|
|
425
|
+
})
|
|
403
426
|
}),
|
|
404
427
|
metadata: {
|
|
405
428
|
openapi: {
|
|
@@ -502,8 +525,13 @@ const emailOTP = (options) => {
|
|
|
502
525
|
{
|
|
503
526
|
method: "POST",
|
|
504
527
|
body: z__namespace.object({
|
|
505
|
-
email: z__namespace.string({}).
|
|
506
|
-
|
|
528
|
+
email: z__namespace.string({}).meta({
|
|
529
|
+
description: "Email address to verify"
|
|
530
|
+
}),
|
|
531
|
+
otp: z__namespace.string().meta({
|
|
532
|
+
required: true,
|
|
533
|
+
description: "OTP to verify"
|
|
534
|
+
})
|
|
507
535
|
}),
|
|
508
536
|
metadata: {
|
|
509
537
|
openapi: {
|
|
@@ -662,8 +690,13 @@ const emailOTP = (options) => {
|
|
|
662
690
|
{
|
|
663
691
|
method: "POST",
|
|
664
692
|
body: z__namespace.object({
|
|
665
|
-
email: z__namespace.string({}).
|
|
666
|
-
|
|
693
|
+
email: z__namespace.string({}).meta({
|
|
694
|
+
description: "Email address to sign in"
|
|
695
|
+
}),
|
|
696
|
+
otp: z__namespace.string().meta({
|
|
697
|
+
required: true,
|
|
698
|
+
description: "OTP sent to the email"
|
|
699
|
+
})
|
|
667
700
|
}),
|
|
668
701
|
metadata: {
|
|
669
702
|
openapi: {
|
|
@@ -822,7 +855,9 @@ const emailOTP = (options) => {
|
|
|
822
855
|
{
|
|
823
856
|
method: "POST",
|
|
824
857
|
body: z__namespace.object({
|
|
825
|
-
email: z__namespace.string().
|
|
858
|
+
email: z__namespace.string().meta({
|
|
859
|
+
description: "Email address to send the OTP"
|
|
860
|
+
})
|
|
826
861
|
}),
|
|
827
862
|
metadata: {
|
|
828
863
|
openapi: {
|
|
@@ -899,9 +934,15 @@ const emailOTP = (options) => {
|
|
|
899
934
|
{
|
|
900
935
|
method: "POST",
|
|
901
936
|
body: z__namespace.object({
|
|
902
|
-
email: z__namespace.string().
|
|
903
|
-
|
|
904
|
-
|
|
937
|
+
email: z__namespace.string().meta({
|
|
938
|
+
description: "Email address to reset the password"
|
|
939
|
+
}),
|
|
940
|
+
otp: z__namespace.string().meta({
|
|
941
|
+
description: "OTP sent to the email"
|
|
942
|
+
}),
|
|
943
|
+
password: z__namespace.string().meta({
|
|
944
|
+
description: "New password"
|
|
945
|
+
})
|
|
905
946
|
}),
|
|
906
947
|
metadata: {
|
|
907
948
|
openapi: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
|
-
import { d as AuthContext, U as User, H as HookEndpointContext } from '../../shared/better-auth.
|
|
2
|
+
import { d as AuthContext, U as User, H as HookEndpointContext } from '../../shared/better-auth.BOKSn3AP.cjs';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
import 'kysely';
|
|
5
5
|
import '../../shared/better-auth.v_lf-jeY.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
|
-
import { d as AuthContext, U as User, H as HookEndpointContext } from '../../shared/better-auth.
|
|
2
|
+
import { d as AuthContext, U as User, H as HookEndpointContext } from '../../shared/better-auth.vNMd9aBC.mjs';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
import 'kysely';
|
|
5
5
|
import '../../shared/better-auth.XefKa8DI.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
|
-
import { d as AuthContext, U as User, H as HookEndpointContext } from '../../shared/better-auth.
|
|
2
|
+
import { d as AuthContext, U as User, H as HookEndpointContext } from '../../shared/better-auth.3es9ZU_K.js';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
import 'kysely';
|
|
5
5
|
import '../../shared/better-auth.4SXCyo06.js';
|