better-auth 1.2.0-beta.1 → 1.2.0-beta.11
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.cjs +12 -5
- package/dist/adapters/drizzle.d.cts +6 -2
- package/dist/adapters/drizzle.d.ts +6 -2
- package/dist/adapters/drizzle.js +11 -4
- package/dist/adapters/kysely.cjs +5 -5
- package/dist/adapters/kysely.d.cts +6 -2
- package/dist/adapters/kysely.d.ts +6 -2
- package/dist/adapters/kysely.js +3 -3
- package/dist/adapters/memory.cjs +4 -4
- package/dist/adapters/memory.d.cts +6 -2
- package/dist/adapters/memory.d.ts +6 -2
- package/dist/adapters/memory.js +3 -3
- package/dist/adapters/mongodb.cjs +26 -8
- package/dist/adapters/mongodb.d.cts +6 -2
- package/dist/adapters/mongodb.d.ts +6 -2
- package/dist/adapters/mongodb.js +24 -6
- package/dist/adapters/prisma.cjs +18 -5
- package/dist/adapters/prisma.d.cts +6 -2
- package/dist/adapters/prisma.d.ts +6 -2
- package/dist/adapters/prisma.js +16 -3
- package/dist/adapters/test.cjs +1 -1
- package/dist/adapters/test.d.cts +2 -2
- package/dist/adapters/test.d.ts +2 -2
- package/dist/adapters/test.js +1 -1
- package/dist/api.cjs +48 -44
- package/dist/api.d.cts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/api.js +5 -5
- package/dist/{auth-DcMc3BIq.d.ts → auth-C-uLTIcY.d.ts} +12002 -7646
- package/dist/{auth-D4rdpxtI.d.cts → auth-lDfjrjVd.d.cts} +12002 -7646
- package/dist/{chunk-MGJLVQOV.js → chunk-2OAHQPLI.js} +100 -38
- package/dist/{chunk-5E75URIA.cjs → chunk-2Z6CVQHH.cjs} +0 -4
- package/dist/{chunk-WVLPJXQR.cjs → chunk-3FWLBBDV.cjs} +109 -51
- package/dist/{chunk-WDOY7YUW.cjs → chunk-6P33VPUY.cjs} +106 -44
- package/dist/{chunk-ADGXBH3Y.js → chunk-6XMAWIGH.js} +29 -26
- package/dist/{chunk-G7HOSQ5N.cjs → chunk-75MYIQ34.cjs} +15 -18
- package/dist/{chunk-YW3B2ST3.js → chunk-BY25AMN4.js} +116 -5
- package/dist/{chunk-LZ5DEQVH.cjs → chunk-C4T7TNDG.cjs} +3 -3
- package/dist/{chunk-PJ4KWXLQ.cjs → chunk-DH5E7574.cjs} +8 -8
- package/dist/{chunk-5RY45WFV.js → chunk-DIIVSN3J.js} +36 -13
- package/dist/{chunk-OSBTXYDD.cjs → chunk-GQKBG2VQ.cjs} +125 -14
- package/dist/{chunk-BKFMDM3P.js → chunk-HRI7BYTU.js} +115 -16
- package/dist/{chunk-6O2GLU2U.cjs → chunk-ICONG5HP.cjs} +18 -13
- package/dist/{chunk-3EY3LSQR.js → chunk-IVS5VS3V.js} +75 -36
- package/dist/{chunk-YRUDZRY3.cjs → chunk-IYCSNEDU.cjs} +79 -56
- package/dist/{chunk-NU4SXYJ5.cjs → chunk-JDAHD767.cjs} +198 -42
- package/dist/{chunk-UP6VJQDB.js → chunk-JHLVXVME.js} +17 -10
- package/dist/{chunk-WLXFBYQ6.cjs → chunk-JU56U5MW.cjs} +79 -9
- package/dist/{chunk-QFYRLTM5.cjs → chunk-JYPC7ZAL.cjs} +52 -49
- package/dist/{chunk-UHGAA4GH.cjs → chunk-KNVDJ4WK.cjs} +5 -5
- package/dist/{chunk-CVDYU5OC.js → chunk-M6SPJGF4.js} +5 -8
- package/dist/{chunk-BAPXDO3E.cjs → chunk-MKNA7SED.cjs} +125 -26
- package/dist/{chunk-GTM45OYP.cjs → chunk-NQFRXDEY.cjs} +3 -3
- package/dist/{chunk-FXNG3YQA.js → chunk-NXQP77NI.js} +146 -79
- package/dist/{chunk-FA6UYV37.js → chunk-PR54V2QL.js} +29 -10
- package/dist/{chunk-JLATHUM5.cjs → chunk-QBYD37C7.cjs} +21 -14
- package/dist/{chunk-E6LJZ5ME.js → chunk-QFIG4XKQ.js} +1 -1
- package/dist/{chunk-764RYNTE.cjs → chunk-QS2XIJC4.cjs} +63 -29
- package/dist/{chunk-GTQM7JU7.js → chunk-R42K7GPF.js} +3 -1
- package/dist/{chunk-3BWJXTLC.cjs → chunk-RHWADEUT.cjs} +81 -58
- package/dist/{chunk-JNZYTS3B.js → chunk-RS2A52JD.js} +1 -1
- package/dist/{chunk-5OBRFII2.js → chunk-SIAKIOPW.js} +81 -23
- package/dist/{chunk-V6RGXSG4.cjs → chunk-SVC7H7K4.cjs} +3 -1
- package/dist/{chunk-EM73ZZSP.cjs → chunk-TID6AR5K.cjs} +49 -30
- package/dist/{chunk-VXDYNCOX.js → chunk-TODG5RSV.js} +172 -19
- package/dist/{chunk-VPCROEJW.cjs → chunk-TZ2VLKIG.cjs} +170 -103
- package/dist/{chunk-WGCTQNSQ.js → chunk-UHBMFLSF.js} +1 -1
- package/dist/{chunk-PIWBUHRB.cjs → chunk-UPQLFVFU.cjs} +83 -43
- package/dist/{chunk-B5UCLTPZ.cjs → chunk-UQC2FUXC.cjs} +2 -1
- package/dist/{chunk-RGG6OEA3.js → chunk-VUXQHI6K.js} +60 -26
- package/dist/{chunk-2LQ7T2GE.js → chunk-WUUDJ3TF.js} +3 -3
- package/dist/{chunk-HZBNUY7E.js → chunk-WZ6OIVJK.js} +2 -1
- package/dist/{chunk-5XAVWKUN.js → chunk-X4X6WCXH.js} +74 -4
- package/dist/{chunk-NPO64SVN.js → chunk-ZFUBVSZD.js} +0 -4
- package/dist/{chunk-S6MI7ZLE.js → chunk-ZKNBNGHR.js} +12 -7
- package/dist/{chunk-5KMF6HGF.js → chunk-ZUGWIOG4.js} +75 -52
- package/dist/client/plugins.cjs +215 -21
- package/dist/client/plugins.d.cts +176 -10
- package/dist/client/plugins.d.ts +176 -10
- package/dist/client/plugins.js +214 -14
- package/dist/client.d.cts +6 -7
- package/dist/client.d.ts +6 -7
- package/dist/cookies.d.cts +2 -2
- package/dist/cookies.d.ts +2 -2
- package/dist/db.cjs +29 -29
- package/dist/db.d.cts +6 -6
- package/dist/db.d.ts +6 -6
- package/dist/db.js +3 -3
- package/dist/index-BX_H-j6k.d.cts +7755 -0
- package/dist/{index-Ba5bMY6A.d.cts → index-BuRgaJZR.d.cts} +194 -2
- package/dist/index-D5zWKzf9.d.ts +7755 -0
- package/dist/{index-XrJz4AYF.d.ts → index-moQjyfmm.d.ts} +194 -2
- package/dist/index.cjs +19 -19
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/next-js.cjs +24 -24
- package/dist/next-js.d.cts +2 -2
- package/dist/next-js.d.ts +2 -2
- package/dist/next-js.js +23 -23
- package/dist/node.d.cts +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/oauth2.cjs +9 -9
- package/dist/oauth2.d.cts +6 -5
- package/dist/oauth2.d.ts +6 -5
- package/dist/oauth2.js +2 -2
- package/dist/plugins/admin.cjs +7 -7
- package/dist/plugins/admin.d.cts +163 -32
- package/dist/plugins/admin.d.ts +163 -32
- package/dist/plugins/admin.js +6 -6
- package/dist/plugins/anonymous.cjs +7 -7
- package/dist/plugins/anonymous.d.cts +8 -4
- package/dist/plugins/anonymous.d.ts +8 -4
- package/dist/plugins/anonymous.js +6 -6
- package/dist/plugins/bearer.cjs +7 -7
- package/dist/plugins/bearer.d.cts +2 -2
- package/dist/plugins/bearer.d.ts +2 -2
- package/dist/plugins/bearer.js +6 -6
- package/dist/{plugin → plugins}/custom-session.cjs +7 -7
- package/dist/{plugin → plugins}/custom-session.d.cts +8 -4
- package/dist/{plugin → plugins}/custom-session.d.ts +8 -4
- package/dist/{plugin → plugins}/custom-session.js +6 -6
- package/dist/plugins/email-otp.cjs +7 -7
- package/dist/plugins/email-otp.d.cts +44 -16
- package/dist/plugins/email-otp.d.ts +44 -16
- package/dist/plugins/email-otp.js +6 -6
- package/dist/plugins/generic-oauth.cjs +7 -7
- package/dist/plugins/generic-oauth.d.cts +95 -6
- package/dist/plugins/generic-oauth.d.ts +95 -6
- package/dist/plugins/generic-oauth.js +6 -6
- package/dist/plugins/jwt.cjs +7 -7
- package/dist/plugins/jwt.d.cts +28 -6
- package/dist/plugins/jwt.d.ts +28 -6
- package/dist/plugins/jwt.js +6 -6
- package/dist/plugins/magic-link.cjs +7 -7
- package/dist/plugins/magic-link.d.cts +16 -4
- package/dist/plugins/magic-link.d.ts +16 -4
- package/dist/plugins/magic-link.js +6 -6
- package/dist/plugins/multi-session.cjs +7 -7
- package/dist/plugins/multi-session.d.cts +20 -8
- package/dist/plugins/multi-session.d.ts +20 -8
- package/dist/plugins/multi-session.js +6 -6
- package/dist/plugins/oidc-provider.cjs +7 -7
- package/dist/plugins/oidc-provider.d.cts +58 -15
- package/dist/plugins/oidc-provider.d.ts +58 -15
- package/dist/plugins/oidc-provider.js +6 -6
- package/dist/plugins/one-tap.cjs +7 -7
- package/dist/plugins/one-tap.d.cts +13 -2
- package/dist/plugins/one-tap.d.ts +13 -2
- package/dist/plugins/one-tap.js +6 -6
- package/dist/plugins/open-api.cjs +8 -8
- package/dist/plugins/open-api.d.cts +14 -6
- package/dist/plugins/open-api.d.ts +14 -6
- package/dist/plugins/open-api.js +7 -7
- package/dist/plugins/organization.cjs +7 -7
- package/dist/plugins/organization.d.cts +3 -3
- package/dist/plugins/organization.d.ts +3 -3
- package/dist/plugins/organization.js +6 -6
- package/dist/plugins/passkey.cjs +19 -31
- package/dist/plugins/passkey.d.cts +45 -148
- package/dist/plugins/passkey.d.ts +45 -148
- package/dist/plugins/passkey.js +5 -9
- package/dist/plugins/phone-number.cjs +7 -7
- package/dist/plugins/phone-number.d.cts +122 -9
- package/dist/plugins/phone-number.d.ts +122 -9
- package/dist/plugins/phone-number.js +6 -6
- package/dist/plugins/sso.cjs +27 -19
- package/dist/plugins/sso.d.cts +24 -8
- package/dist/plugins/sso.d.ts +24 -8
- package/dist/plugins/sso.js +14 -6
- package/dist/plugins/two-factor.cjs +7 -7
- package/dist/plugins/two-factor.d.cts +62 -22
- package/dist/plugins/two-factor.d.ts +62 -22
- package/dist/plugins/two-factor.js +6 -6
- package/dist/plugins/username.cjs +7 -7
- package/dist/plugins/username.d.cts +36 -4
- package/dist/plugins/username.d.ts +36 -4
- package/dist/plugins/username.js +6 -6
- package/dist/plugins.cjs +43 -43
- package/dist/plugins.d.cts +11 -7
- package/dist/plugins.d.ts +11 -7
- package/dist/plugins.js +23 -23
- package/dist/react.d.cts +7 -9
- package/dist/react.d.ts +7 -9
- package/dist/social.cjs +32 -20
- package/dist/social.d.cts +1 -1
- package/dist/social.d.ts +1 -1
- package/dist/social.js +3 -3
- package/dist/solid.d.cts +7 -7
- package/dist/solid.d.ts +7 -7
- package/dist/{state-Cm8el5M1.d.ts → state-CLmFUxz3.d.ts} +1 -1
- package/dist/{state-DcraY2_H.d.cts → state-CZgzjtR5.d.cts} +1 -1
- package/dist/svelte-kit.d.cts +2 -2
- package/dist/svelte-kit.d.ts +2 -2
- package/dist/svelte.d.cts +7 -7
- package/dist/svelte.d.ts +7 -7
- package/dist/types.d.cts +4 -4
- package/dist/types.d.ts +4 -4
- package/dist/vue.d.cts +7 -7
- package/dist/vue.d.ts +7 -7
- package/package.json +4 -4
- package/dist/chunk-4WCY4Y5J.js +0 -173
- package/dist/chunk-5AZFOKWY.cjs +0 -176
- package/dist/index-CvlKSqnF.d.cts +0 -4023
- package/dist/index-Ivs2EsUL.d.ts +0 -4023
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { B as BetterAuthOptions, k as InferUser, l as InferSession } from '../auth-
|
|
3
|
+
import { B as BetterAuthOptions, k as InferUser, l as InferSession } from '../auth-C-uLTIcY.js';
|
|
4
4
|
import 'kysely';
|
|
5
5
|
import '../helper-Bi8FQwDD.js';
|
|
6
|
-
import '../index-
|
|
6
|
+
import '../index-moQjyfmm.js';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
9
|
|
|
@@ -14,7 +14,7 @@ declare const customSession: <Returns extends Record<string, any>, O extends Bet
|
|
|
14
14
|
id: "custom-session";
|
|
15
15
|
endpoints: {
|
|
16
16
|
getSession: {
|
|
17
|
-
<
|
|
17
|
+
<C extends [({
|
|
18
18
|
body?: undefined;
|
|
19
19
|
method?: "GET" | undefined;
|
|
20
20
|
query?: {
|
|
@@ -28,7 +28,11 @@ declare const customSession: <Returns extends Record<string, any>, O extends Bet
|
|
|
28
28
|
returnHeaders?: boolean | undefined;
|
|
29
29
|
use?: better_call.Middleware[] | undefined;
|
|
30
30
|
path?: string | undefined;
|
|
31
|
-
}
|
|
31
|
+
} | undefined)?]>(...inputCtx: C): Promise<C extends [{
|
|
32
|
+
asResponse: true;
|
|
33
|
+
}] ? Response : C extends [{
|
|
34
|
+
returnHeaders: true;
|
|
35
|
+
}] ? {
|
|
32
36
|
headers: Headers;
|
|
33
37
|
response: Returns | null;
|
|
34
38
|
} : Returns | null>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { customSession } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { customSession } from '../chunk-UHBMFLSF.js';
|
|
2
|
+
import '../chunk-IVS5VS3V.js';
|
|
3
|
+
import '../chunk-TODG5RSV.js';
|
|
4
|
+
import '../chunk-R42K7GPF.js';
|
|
5
5
|
import '../chunk-XFCIANZX.js';
|
|
6
6
|
import '../chunk-QQGZ3XGI.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-WZ6OIVJK.js';
|
|
8
8
|
import '../chunk-KLDFBLYL.js';
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-ZFUBVSZD.js';
|
|
10
10
|
import '../chunk-3XTQSPPA.js';
|
|
11
11
|
import '../chunk-DBPOZRMS.js';
|
|
12
12
|
import '../chunk-53IPO2PJ.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJYPC7ZAL_cjs = require('../chunk-JYPC7ZAL.cjs');
|
|
4
4
|
require('../chunk-JUPDDQC4.cjs');
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
7
|
-
require('../chunk-
|
|
5
|
+
require('../chunk-UPQLFVFU.cjs');
|
|
6
|
+
require('../chunk-JDAHD767.cjs');
|
|
7
|
+
require('../chunk-SVC7H7K4.cjs');
|
|
8
8
|
require('../chunk-S5UORXJH.cjs');
|
|
9
9
|
require('../chunk-V6HE2MP7.cjs');
|
|
10
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-UQC2FUXC.cjs');
|
|
11
11
|
require('../chunk-H74YRRNV.cjs');
|
|
12
|
-
require('../chunk-
|
|
12
|
+
require('../chunk-2Z6CVQHH.cjs');
|
|
13
13
|
require('../chunk-CCKQSGIR.cjs');
|
|
14
14
|
require('../chunk-G2LZ73E2.cjs');
|
|
15
15
|
require('../chunk-OA7Z7IZT.cjs');
|
|
@@ -21,5 +21,5 @@ require('../chunk-PEZRSDZS.cjs');
|
|
|
21
21
|
|
|
22
22
|
Object.defineProperty(exports, "emailOTP", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkJYPC7ZAL_cjs.emailOTP; }
|
|
25
25
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
|
-
import { H as HookEndpointContext } from '../auth-
|
|
3
|
+
import { H as HookEndpointContext } from '../auth-lDfjrjVd.cjs';
|
|
4
4
|
import 'kysely';
|
|
5
5
|
import '../helper-Bi8FQwDD.cjs';
|
|
6
|
-
import '../index-
|
|
6
|
+
import '../index-BuRgaJZR.cjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
9
|
|
|
@@ -46,7 +46,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
46
46
|
id: "email-otp";
|
|
47
47
|
endpoints: {
|
|
48
48
|
sendVerificationOTP: {
|
|
49
|
-
<
|
|
49
|
+
<C extends [{
|
|
50
50
|
body: {
|
|
51
51
|
email: string;
|
|
52
52
|
type: "sign-in" | "forget-password" | "email-verification";
|
|
@@ -60,7 +60,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
60
60
|
returnHeaders?: boolean | undefined;
|
|
61
61
|
use?: better_call.Middleware[] | undefined;
|
|
62
62
|
path?: string | undefined;
|
|
63
|
-
}>(...inputCtx:
|
|
63
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
64
|
+
asResponse: true;
|
|
65
|
+
}] ? Response : C extends [{
|
|
66
|
+
returnHeaders: true;
|
|
67
|
+
}] ? {
|
|
64
68
|
headers: Headers;
|
|
65
69
|
response: {
|
|
66
70
|
success: boolean;
|
|
@@ -108,7 +112,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
108
112
|
path: "/email-otp/send-verification-otp";
|
|
109
113
|
};
|
|
110
114
|
createVerificationOTP: {
|
|
111
|
-
<
|
|
115
|
+
<C extends [{
|
|
112
116
|
body: {
|
|
113
117
|
email: string;
|
|
114
118
|
type: "sign-in" | "forget-password" | "email-verification";
|
|
@@ -122,7 +126,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
122
126
|
returnHeaders?: boolean | undefined;
|
|
123
127
|
use?: better_call.Middleware[] | undefined;
|
|
124
128
|
path?: string | undefined;
|
|
125
|
-
}>(...inputCtx:
|
|
129
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
130
|
+
asResponse: true;
|
|
131
|
+
}] ? Response : C extends [{
|
|
132
|
+
returnHeaders: true;
|
|
133
|
+
}] ? {
|
|
126
134
|
headers: Headers;
|
|
127
135
|
response: string;
|
|
128
136
|
} : string>;
|
|
@@ -162,7 +170,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
162
170
|
path: "/email-otp/create-verification-otp";
|
|
163
171
|
};
|
|
164
172
|
getVerificationOTP: {
|
|
165
|
-
<
|
|
173
|
+
<C extends [{
|
|
166
174
|
query: {
|
|
167
175
|
email: string;
|
|
168
176
|
type: "sign-in" | "forget-password" | "email-verification";
|
|
@@ -176,7 +184,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
176
184
|
returnHeaders?: boolean | undefined;
|
|
177
185
|
use?: better_call.Middleware[] | undefined;
|
|
178
186
|
path?: string | undefined;
|
|
179
|
-
}>(...inputCtx:
|
|
187
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
188
|
+
asResponse: true;
|
|
189
|
+
}] ? Response : C extends [{
|
|
190
|
+
returnHeaders: true;
|
|
191
|
+
}] ? {
|
|
180
192
|
headers: Headers;
|
|
181
193
|
response: {
|
|
182
194
|
otp: null;
|
|
@@ -229,7 +241,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
229
241
|
path: "/email-otp/get-verification-otp";
|
|
230
242
|
};
|
|
231
243
|
verifyEmailOTP: {
|
|
232
|
-
<
|
|
244
|
+
<C extends [{
|
|
233
245
|
body: {
|
|
234
246
|
email: string;
|
|
235
247
|
otp: string;
|
|
@@ -243,7 +255,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
243
255
|
returnHeaders?: boolean | undefined;
|
|
244
256
|
use?: better_call.Middleware[] | undefined;
|
|
245
257
|
path?: string | undefined;
|
|
246
|
-
}>(...inputCtx:
|
|
258
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
259
|
+
asResponse: true;
|
|
260
|
+
}] ? Response : C extends [{
|
|
261
|
+
returnHeaders: true;
|
|
262
|
+
}] ? {
|
|
247
263
|
headers: Headers;
|
|
248
264
|
response: {
|
|
249
265
|
status: boolean;
|
|
@@ -335,7 +351,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
335
351
|
path: "/email-otp/verify-email";
|
|
336
352
|
};
|
|
337
353
|
signInEmailOTP: {
|
|
338
|
-
<
|
|
354
|
+
<C extends [{
|
|
339
355
|
body: {
|
|
340
356
|
email: string;
|
|
341
357
|
otp: string;
|
|
@@ -349,7 +365,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
349
365
|
returnHeaders?: boolean | undefined;
|
|
350
366
|
use?: better_call.Middleware[] | undefined;
|
|
351
367
|
path?: string | undefined;
|
|
352
|
-
}>(...inputCtx:
|
|
368
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
369
|
+
asResponse: true;
|
|
370
|
+
}] ? Response : C extends [{
|
|
371
|
+
returnHeaders: true;
|
|
372
|
+
}] ? {
|
|
353
373
|
headers: Headers;
|
|
354
374
|
response: {
|
|
355
375
|
token: string;
|
|
@@ -418,7 +438,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
418
438
|
path: "/sign-in/email-otp";
|
|
419
439
|
};
|
|
420
440
|
forgetPasswordEmailOTP: {
|
|
421
|
-
<
|
|
441
|
+
<C extends [{
|
|
422
442
|
body: {
|
|
423
443
|
email: string;
|
|
424
444
|
};
|
|
@@ -431,7 +451,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
431
451
|
returnHeaders?: boolean | undefined;
|
|
432
452
|
use?: better_call.Middleware[] | undefined;
|
|
433
453
|
path?: string | undefined;
|
|
434
|
-
}>(...inputCtx:
|
|
454
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
455
|
+
asResponse: true;
|
|
456
|
+
}] ? Response : C extends [{
|
|
457
|
+
returnHeaders: true;
|
|
458
|
+
}] ? {
|
|
435
459
|
headers: Headers;
|
|
436
460
|
response: {
|
|
437
461
|
success: boolean;
|
|
@@ -476,7 +500,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
476
500
|
path: "/forget-password/email-otp";
|
|
477
501
|
};
|
|
478
502
|
resetPasswordEmailOTP: {
|
|
479
|
-
<
|
|
503
|
+
<C extends [{
|
|
480
504
|
body: {
|
|
481
505
|
password: string;
|
|
482
506
|
email: string;
|
|
@@ -491,7 +515,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
491
515
|
returnHeaders?: boolean | undefined;
|
|
492
516
|
use?: better_call.Middleware[] | undefined;
|
|
493
517
|
path?: string | undefined;
|
|
494
|
-
}>(...inputCtx:
|
|
518
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
519
|
+
asResponse: true;
|
|
520
|
+
}] ? Response : C extends [{
|
|
521
|
+
returnHeaders: true;
|
|
522
|
+
}] ? {
|
|
495
523
|
headers: Headers;
|
|
496
524
|
response: {
|
|
497
525
|
success: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
|
-
import { H as HookEndpointContext } from '../auth-
|
|
3
|
+
import { H as HookEndpointContext } from '../auth-C-uLTIcY.js';
|
|
4
4
|
import 'kysely';
|
|
5
5
|
import '../helper-Bi8FQwDD.js';
|
|
6
|
-
import '../index-
|
|
6
|
+
import '../index-moQjyfmm.js';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
9
|
|
|
@@ -46,7 +46,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
46
46
|
id: "email-otp";
|
|
47
47
|
endpoints: {
|
|
48
48
|
sendVerificationOTP: {
|
|
49
|
-
<
|
|
49
|
+
<C extends [{
|
|
50
50
|
body: {
|
|
51
51
|
email: string;
|
|
52
52
|
type: "sign-in" | "forget-password" | "email-verification";
|
|
@@ -60,7 +60,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
60
60
|
returnHeaders?: boolean | undefined;
|
|
61
61
|
use?: better_call.Middleware[] | undefined;
|
|
62
62
|
path?: string | undefined;
|
|
63
|
-
}>(...inputCtx:
|
|
63
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
64
|
+
asResponse: true;
|
|
65
|
+
}] ? Response : C extends [{
|
|
66
|
+
returnHeaders: true;
|
|
67
|
+
}] ? {
|
|
64
68
|
headers: Headers;
|
|
65
69
|
response: {
|
|
66
70
|
success: boolean;
|
|
@@ -108,7 +112,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
108
112
|
path: "/email-otp/send-verification-otp";
|
|
109
113
|
};
|
|
110
114
|
createVerificationOTP: {
|
|
111
|
-
<
|
|
115
|
+
<C extends [{
|
|
112
116
|
body: {
|
|
113
117
|
email: string;
|
|
114
118
|
type: "sign-in" | "forget-password" | "email-verification";
|
|
@@ -122,7 +126,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
122
126
|
returnHeaders?: boolean | undefined;
|
|
123
127
|
use?: better_call.Middleware[] | undefined;
|
|
124
128
|
path?: string | undefined;
|
|
125
|
-
}>(...inputCtx:
|
|
129
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
130
|
+
asResponse: true;
|
|
131
|
+
}] ? Response : C extends [{
|
|
132
|
+
returnHeaders: true;
|
|
133
|
+
}] ? {
|
|
126
134
|
headers: Headers;
|
|
127
135
|
response: string;
|
|
128
136
|
} : string>;
|
|
@@ -162,7 +170,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
162
170
|
path: "/email-otp/create-verification-otp";
|
|
163
171
|
};
|
|
164
172
|
getVerificationOTP: {
|
|
165
|
-
<
|
|
173
|
+
<C extends [{
|
|
166
174
|
query: {
|
|
167
175
|
email: string;
|
|
168
176
|
type: "sign-in" | "forget-password" | "email-verification";
|
|
@@ -176,7 +184,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
176
184
|
returnHeaders?: boolean | undefined;
|
|
177
185
|
use?: better_call.Middleware[] | undefined;
|
|
178
186
|
path?: string | undefined;
|
|
179
|
-
}>(...inputCtx:
|
|
187
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
188
|
+
asResponse: true;
|
|
189
|
+
}] ? Response : C extends [{
|
|
190
|
+
returnHeaders: true;
|
|
191
|
+
}] ? {
|
|
180
192
|
headers: Headers;
|
|
181
193
|
response: {
|
|
182
194
|
otp: null;
|
|
@@ -229,7 +241,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
229
241
|
path: "/email-otp/get-verification-otp";
|
|
230
242
|
};
|
|
231
243
|
verifyEmailOTP: {
|
|
232
|
-
<
|
|
244
|
+
<C extends [{
|
|
233
245
|
body: {
|
|
234
246
|
email: string;
|
|
235
247
|
otp: string;
|
|
@@ -243,7 +255,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
243
255
|
returnHeaders?: boolean | undefined;
|
|
244
256
|
use?: better_call.Middleware[] | undefined;
|
|
245
257
|
path?: string | undefined;
|
|
246
|
-
}>(...inputCtx:
|
|
258
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
259
|
+
asResponse: true;
|
|
260
|
+
}] ? Response : C extends [{
|
|
261
|
+
returnHeaders: true;
|
|
262
|
+
}] ? {
|
|
247
263
|
headers: Headers;
|
|
248
264
|
response: {
|
|
249
265
|
status: boolean;
|
|
@@ -335,7 +351,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
335
351
|
path: "/email-otp/verify-email";
|
|
336
352
|
};
|
|
337
353
|
signInEmailOTP: {
|
|
338
|
-
<
|
|
354
|
+
<C extends [{
|
|
339
355
|
body: {
|
|
340
356
|
email: string;
|
|
341
357
|
otp: string;
|
|
@@ -349,7 +365,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
349
365
|
returnHeaders?: boolean | undefined;
|
|
350
366
|
use?: better_call.Middleware[] | undefined;
|
|
351
367
|
path?: string | undefined;
|
|
352
|
-
}>(...inputCtx:
|
|
368
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
369
|
+
asResponse: true;
|
|
370
|
+
}] ? Response : C extends [{
|
|
371
|
+
returnHeaders: true;
|
|
372
|
+
}] ? {
|
|
353
373
|
headers: Headers;
|
|
354
374
|
response: {
|
|
355
375
|
token: string;
|
|
@@ -418,7 +438,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
418
438
|
path: "/sign-in/email-otp";
|
|
419
439
|
};
|
|
420
440
|
forgetPasswordEmailOTP: {
|
|
421
|
-
<
|
|
441
|
+
<C extends [{
|
|
422
442
|
body: {
|
|
423
443
|
email: string;
|
|
424
444
|
};
|
|
@@ -431,7 +451,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
431
451
|
returnHeaders?: boolean | undefined;
|
|
432
452
|
use?: better_call.Middleware[] | undefined;
|
|
433
453
|
path?: string | undefined;
|
|
434
|
-
}>(...inputCtx:
|
|
454
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
455
|
+
asResponse: true;
|
|
456
|
+
}] ? Response : C extends [{
|
|
457
|
+
returnHeaders: true;
|
|
458
|
+
}] ? {
|
|
435
459
|
headers: Headers;
|
|
436
460
|
response: {
|
|
437
461
|
success: boolean;
|
|
@@ -476,7 +500,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
476
500
|
path: "/forget-password/email-otp";
|
|
477
501
|
};
|
|
478
502
|
resetPasswordEmailOTP: {
|
|
479
|
-
<
|
|
503
|
+
<C extends [{
|
|
480
504
|
body: {
|
|
481
505
|
password: string;
|
|
482
506
|
email: string;
|
|
@@ -491,7 +515,11 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
491
515
|
returnHeaders?: boolean | undefined;
|
|
492
516
|
use?: better_call.Middleware[] | undefined;
|
|
493
517
|
path?: string | undefined;
|
|
494
|
-
}>(...inputCtx:
|
|
518
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
519
|
+
asResponse: true;
|
|
520
|
+
}] ? Response : C extends [{
|
|
521
|
+
returnHeaders: true;
|
|
522
|
+
}] ? {
|
|
495
523
|
headers: Headers;
|
|
496
524
|
response: {
|
|
497
525
|
success: boolean;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { emailOTP } from '../chunk-
|
|
1
|
+
export { emailOTP } from '../chunk-6XMAWIGH.js';
|
|
2
2
|
import '../chunk-JEYF2ARX.js';
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-IVS5VS3V.js';
|
|
4
|
+
import '../chunk-TODG5RSV.js';
|
|
5
|
+
import '../chunk-R42K7GPF.js';
|
|
6
6
|
import '../chunk-XFCIANZX.js';
|
|
7
7
|
import '../chunk-QQGZ3XGI.js';
|
|
8
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-WZ6OIVJK.js';
|
|
9
9
|
import '../chunk-KLDFBLYL.js';
|
|
10
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-ZFUBVSZD.js';
|
|
11
11
|
import '../chunk-3XTQSPPA.js';
|
|
12
12
|
import '../chunk-DBPOZRMS.js';
|
|
13
13
|
import '../chunk-53IPO2PJ.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
3
|
+
var chunkGQKBG2VQ_cjs = require('../chunk-GQKBG2VQ.cjs');
|
|
4
|
+
require('../chunk-UPQLFVFU.cjs');
|
|
5
|
+
require('../chunk-JDAHD767.cjs');
|
|
6
|
+
require('../chunk-SVC7H7K4.cjs');
|
|
7
7
|
require('../chunk-S5UORXJH.cjs');
|
|
8
8
|
require('../chunk-V6HE2MP7.cjs');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-UQC2FUXC.cjs');
|
|
10
10
|
require('../chunk-H74YRRNV.cjs');
|
|
11
|
-
require('../chunk-
|
|
11
|
+
require('../chunk-2Z6CVQHH.cjs');
|
|
12
12
|
require('../chunk-CCKQSGIR.cjs');
|
|
13
13
|
require('../chunk-G2LZ73E2.cjs');
|
|
14
14
|
require('../chunk-OA7Z7IZT.cjs');
|
|
@@ -20,5 +20,5 @@ require('../chunk-PEZRSDZS.cjs');
|
|
|
20
20
|
|
|
21
21
|
Object.defineProperty(exports, "genericOAuth", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkGQKBG2VQ_cjs.genericOAuth; }
|
|
24
24
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { b as AuthContext, U as User } from '../auth-
|
|
4
|
-
import { O as OAuthProvider, a as OAuth2Tokens } from '../index-
|
|
3
|
+
import { b as AuthContext, U as User } from '../auth-lDfjrjVd.cjs';
|
|
4
|
+
import { O as OAuthProvider, a as OAuth2Tokens } from '../index-BuRgaJZR.cjs';
|
|
5
5
|
import 'kysely';
|
|
6
6
|
import '../helper-Bi8FQwDD.cjs';
|
|
7
7
|
import 'better-sqlite3';
|
|
@@ -116,9 +116,10 @@ declare const genericOAuth: (options: GenericOAuthOptions) => {
|
|
|
116
116
|
};
|
|
117
117
|
endpoints: {
|
|
118
118
|
signInWithOAuth2: {
|
|
119
|
-
<
|
|
119
|
+
<C extends [{
|
|
120
120
|
body: {
|
|
121
121
|
providerId: string;
|
|
122
|
+
scopes?: string[] | undefined;
|
|
122
123
|
callbackURL?: string | undefined;
|
|
123
124
|
errorCallbackURL?: string | undefined;
|
|
124
125
|
newUserCallbackURL?: string | undefined;
|
|
@@ -133,7 +134,11 @@ declare const genericOAuth: (options: GenericOAuthOptions) => {
|
|
|
133
134
|
returnHeaders?: boolean | undefined;
|
|
134
135
|
use?: better_call.Middleware[] | undefined;
|
|
135
136
|
path?: string | undefined;
|
|
136
|
-
}>(...inputCtx:
|
|
137
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
138
|
+
asResponse: true;
|
|
139
|
+
}] ? Response : C extends [{
|
|
140
|
+
returnHeaders: true;
|
|
141
|
+
}] ? {
|
|
137
142
|
headers: Headers;
|
|
138
143
|
response: {
|
|
139
144
|
url: string;
|
|
@@ -151,14 +156,17 @@ declare const genericOAuth: (options: GenericOAuthOptions) => {
|
|
|
151
156
|
errorCallbackURL: z.ZodOptional<z.ZodString>;
|
|
152
157
|
newUserCallbackURL: z.ZodOptional<z.ZodString>;
|
|
153
158
|
disableRedirect: z.ZodOptional<z.ZodBoolean>;
|
|
159
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
154
160
|
}, "strip", z.ZodTypeAny, {
|
|
155
161
|
providerId: string;
|
|
162
|
+
scopes?: string[] | undefined;
|
|
156
163
|
callbackURL?: string | undefined;
|
|
157
164
|
errorCallbackURL?: string | undefined;
|
|
158
165
|
newUserCallbackURL?: string | undefined;
|
|
159
166
|
disableRedirect?: boolean | undefined;
|
|
160
167
|
}, {
|
|
161
168
|
providerId: string;
|
|
169
|
+
scopes?: string[] | undefined;
|
|
162
170
|
callbackURL?: string | undefined;
|
|
163
171
|
errorCallbackURL?: string | undefined;
|
|
164
172
|
newUserCallbackURL?: string | undefined;
|
|
@@ -195,7 +203,7 @@ declare const genericOAuth: (options: GenericOAuthOptions) => {
|
|
|
195
203
|
path: "/sign-in/oauth2";
|
|
196
204
|
};
|
|
197
205
|
oAuth2Callback: {
|
|
198
|
-
<
|
|
206
|
+
<C extends [{
|
|
199
207
|
query: {
|
|
200
208
|
state?: string | undefined;
|
|
201
209
|
code?: string | undefined;
|
|
@@ -212,7 +220,11 @@ declare const genericOAuth: (options: GenericOAuthOptions) => {
|
|
|
212
220
|
returnHeaders?: boolean | undefined;
|
|
213
221
|
use?: better_call.Middleware[] | undefined;
|
|
214
222
|
path?: string | undefined;
|
|
215
|
-
}>(...inputCtx:
|
|
223
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
224
|
+
asResponse: true;
|
|
225
|
+
}] ? Response : C extends [{
|
|
226
|
+
returnHeaders: true;
|
|
227
|
+
}] ? {
|
|
216
228
|
headers: Headers;
|
|
217
229
|
response: void;
|
|
218
230
|
} : void>;
|
|
@@ -258,6 +270,83 @@ declare const genericOAuth: (options: GenericOAuthOptions) => {
|
|
|
258
270
|
};
|
|
259
271
|
path: "/oauth2/callback/:providerId";
|
|
260
272
|
};
|
|
273
|
+
oAuth2LinkAccount: {
|
|
274
|
+
<C extends [{
|
|
275
|
+
body: {
|
|
276
|
+
providerId: string;
|
|
277
|
+
callbackURL: string;
|
|
278
|
+
};
|
|
279
|
+
method?: "POST" | undefined;
|
|
280
|
+
query?: Record<string, any> | undefined;
|
|
281
|
+
params?: Record<string, any> | undefined;
|
|
282
|
+
request?: Request | undefined;
|
|
283
|
+
headers?: HeadersInit | undefined;
|
|
284
|
+
asResponse?: boolean | undefined;
|
|
285
|
+
returnHeaders?: boolean | undefined;
|
|
286
|
+
use?: better_call.Middleware[] | undefined;
|
|
287
|
+
path?: string | undefined;
|
|
288
|
+
}]>(...inputCtx: C): Promise<C extends [{
|
|
289
|
+
asResponse: true;
|
|
290
|
+
}] ? Response : C extends [{
|
|
291
|
+
returnHeaders: true;
|
|
292
|
+
}] ? {
|
|
293
|
+
headers: Headers;
|
|
294
|
+
response: {
|
|
295
|
+
url: string;
|
|
296
|
+
redirect: boolean;
|
|
297
|
+
};
|
|
298
|
+
} : {
|
|
299
|
+
url: string;
|
|
300
|
+
redirect: boolean;
|
|
301
|
+
}>;
|
|
302
|
+
options: {
|
|
303
|
+
method: "POST";
|
|
304
|
+
body: z.ZodObject<{
|
|
305
|
+
providerId: z.ZodString;
|
|
306
|
+
callbackURL: z.ZodString;
|
|
307
|
+
}, "strip", z.ZodTypeAny, {
|
|
308
|
+
providerId: string;
|
|
309
|
+
callbackURL: string;
|
|
310
|
+
}, {
|
|
311
|
+
providerId: string;
|
|
312
|
+
callbackURL: string;
|
|
313
|
+
}>;
|
|
314
|
+
use: ((inputContext: {
|
|
315
|
+
body?: any;
|
|
316
|
+
query?: Record<string, any> | undefined;
|
|
317
|
+
request?: Request | undefined;
|
|
318
|
+
headers?: Headers | undefined;
|
|
319
|
+
asResponse?: boolean | undefined;
|
|
320
|
+
returnHeaders?: boolean | undefined;
|
|
321
|
+
use?: better_call.Middleware[] | undefined;
|
|
322
|
+
}) => Promise<{
|
|
323
|
+
session: {
|
|
324
|
+
session: Record<string, any> & {
|
|
325
|
+
id: string;
|
|
326
|
+
createdAt: Date;
|
|
327
|
+
updatedAt: Date;
|
|
328
|
+
userId: string;
|
|
329
|
+
expiresAt: Date;
|
|
330
|
+
token: string;
|
|
331
|
+
ipAddress?: string | null | undefined;
|
|
332
|
+
userAgent?: string | null | undefined;
|
|
333
|
+
};
|
|
334
|
+
user: Record<string, any> & {
|
|
335
|
+
id: string;
|
|
336
|
+
name: string;
|
|
337
|
+
email: string;
|
|
338
|
+
emailVerified: boolean;
|
|
339
|
+
createdAt: Date;
|
|
340
|
+
updatedAt: Date;
|
|
341
|
+
image?: string | null | undefined;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
}>)[];
|
|
345
|
+
} & {
|
|
346
|
+
use: any[];
|
|
347
|
+
};
|
|
348
|
+
path: "/oauth2/link";
|
|
349
|
+
};
|
|
261
350
|
};
|
|
262
351
|
$ERROR_CODES: {
|
|
263
352
|
readonly INVALID_OAUTH_CONFIGURATION: "Invalid OAuth configuration";
|