better-auth 1.1.19 → 1.1.20-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/drizzle.cjs +3 -2
- package/dist/adapters/drizzle.js +3 -2
- package/dist/adapters/kysely.cjs +3 -2
- package/dist/adapters/kysely.js +3 -2
- package/dist/adapters/memory.cjs +3 -2
- package/dist/adapters/memory.js +3 -2
- package/dist/adapters/mongodb.cjs +3 -2
- package/dist/adapters/mongodb.js +3 -2
- package/dist/adapters/prisma.cjs +3 -2
- package/dist/adapters/prisma.js +3 -2
- package/dist/adapters/test.cjs +3 -2
- package/dist/adapters/test.js +3 -2
- package/dist/api.cjs +43 -42
- package/dist/api.js +4 -3
- package/dist/{chunk-PZOB66AP.js → chunk-22MDVNY4.js} +1 -1
- package/dist/{chunk-NPO64SVN.js → chunk-6FWXNZZU.js} +1 -1
- package/dist/{chunk-LNAETVOO.js → chunk-7CF7MAUP.js} +2 -2
- package/dist/{chunk-RBOAD55Y.js → chunk-7FISESIZ.js} +2 -2
- package/dist/{chunk-NP2H7VJV.js → chunk-A7W6P2EO.js} +1 -1
- package/dist/{chunk-VBGK4DWN.cjs → chunk-APUKZXEV.cjs} +6 -6
- package/dist/{chunk-RIG7YPJ7.cjs → chunk-BHCSBRQ7.cjs} +12 -12
- package/dist/{chunk-PHHYUVFI.js → chunk-BZXK743J.js} +1 -1
- package/dist/{chunk-AVAADPGB.js → chunk-CPQ6R4B3.js} +1 -1
- package/dist/{chunk-5E75URIA.cjs → chunk-EUROSDXK.cjs} +3 -3
- package/dist/chunk-FGOOJHXQ.js +11 -0
- package/dist/{chunk-MKCNGAWP.cjs → chunk-G3TBGWNZ.cjs} +12 -12
- package/dist/{chunk-LBQAB3RP.cjs → chunk-GH3YZUQI.cjs} +2 -2
- package/dist/{chunk-M7C7TKIU.js → chunk-H5IXM5TA.js} +1 -1
- package/dist/{chunk-CZFMWDZS.cjs → chunk-HMBKHRAX.cjs} +6 -6
- package/dist/{chunk-FR3BYA47.js → chunk-IROQF4NE.js} +1 -1
- package/dist/{chunk-2KOUY3SJ.js → chunk-KNDZD3CQ.js} +2 -2
- package/dist/{chunk-XYKBKO6Z.js → chunk-LCVJ26NH.js} +32 -3
- package/dist/{chunk-G2LZ73E2.cjs → chunk-LJFOH3ZP.cjs} +0 -8
- package/dist/{chunk-2NSMOHHG.cjs → chunk-LJSD7MR6.cjs} +12 -12
- package/dist/{chunk-BN4OGQMW.cjs → chunk-LL7HNDO5.cjs} +4 -4
- package/dist/{chunk-KKKJI5Y7.js → chunk-LZTCM5U7.js} +1 -1
- package/dist/{chunk-6B3UWAJ3.js → chunk-MC573B2S.js} +1 -1
- package/dist/{chunk-WJMWNKCB.cjs → chunk-PZKWFVFD.cjs} +30 -30
- package/dist/{chunk-FPODT2DW.cjs → chunk-QA4KQPZK.cjs} +8 -8
- package/dist/{chunk-ZARJGP36.cjs → chunk-QJZQNVQ4.cjs} +37 -8
- package/dist/{chunk-2J44NOOL.cjs → chunk-QWA5VYSA.cjs} +29 -29
- package/dist/{chunk-2RDAV2UB.js → chunk-RGDI2ALG.js} +44 -19
- package/dist/{chunk-NIUW4WF7.js → chunk-RMSVLQRY.js} +2 -2
- package/dist/{chunk-IJE74CNB.cjs → chunk-TVZYFBHF.cjs} +70 -45
- package/dist/{chunk-PBHGHIIK.cjs → chunk-VIKDTKRV.cjs} +7 -7
- package/dist/{chunk-DBPOZRMS.js → chunk-VKN4655D.js} +1 -8
- package/dist/chunk-VUQBJCJJ.cjs +13 -0
- package/dist/{chunk-6RU7HIHF.cjs → chunk-WB34WUQE.cjs} +3 -3
- package/dist/{chunk-A2ZRWQDL.cjs → chunk-WJRAPFS6.cjs} +6 -6
- package/dist/{chunk-VRVK7CFW.js → chunk-WXAJHOCZ.js} +3 -2
- package/dist/{chunk-KZG2B6JC.cjs → chunk-XA4NKRMR.cjs} +54 -54
- package/dist/{chunk-43NEQAQY.cjs → chunk-XIKHDHE2.cjs} +31 -30
- package/dist/{chunk-7LU7PVPP.js → chunk-XQAMVSSB.js} +2 -2
- package/dist/{chunk-KYDZ4BE2.js → chunk-YE3JMVDC.js} +2 -2
- package/dist/client/plugins.cjs +2 -2
- package/dist/client/plugins.js +1 -1
- package/dist/crypto.cjs +14 -13
- package/dist/crypto.js +2 -1
- package/dist/db.cjs +3 -2
- package/dist/db.js +3 -2
- package/dist/index.cjs +11 -10
- package/dist/index.js +4 -3
- package/dist/oauth2.cjs +5 -4
- package/dist/oauth2.js +3 -2
- package/dist/plugin/custom-session.cjs +6 -5
- package/dist/plugin/custom-session.js +5 -4
- package/dist/plugins/admin.cjs +6 -5
- package/dist/plugins/admin.js +5 -4
- package/dist/plugins/anonymous.cjs +6 -5
- package/dist/plugins/anonymous.js +5 -4
- package/dist/plugins/bearer.cjs +6 -5
- package/dist/plugins/bearer.js +5 -4
- package/dist/plugins/email-otp.cjs +6 -5
- package/dist/plugins/email-otp.js +5 -4
- package/dist/plugins/generic-oauth.cjs +6 -5
- package/dist/plugins/generic-oauth.js +5 -4
- package/dist/plugins/jwt.cjs +6 -5
- package/dist/plugins/jwt.js +5 -4
- package/dist/plugins/magic-link.cjs +6 -5
- package/dist/plugins/magic-link.js +5 -4
- package/dist/plugins/multi-session.cjs +6 -5
- package/dist/plugins/multi-session.js +5 -4
- package/dist/plugins/oidc-provider.cjs +6 -5
- package/dist/plugins/oidc-provider.js +5 -4
- package/dist/plugins/one-tap.cjs +6 -5
- package/dist/plugins/one-tap.js +5 -4
- package/dist/plugins/open-api.cjs +6 -5
- package/dist/plugins/open-api.js +5 -4
- package/dist/plugins/organization.cjs +6 -5
- package/dist/plugins/organization.js +5 -4
- package/dist/plugins/passkey.cjs +18 -17
- package/dist/plugins/passkey.js +4 -3
- package/dist/plugins/phone-number.cjs +6 -5
- package/dist/plugins/phone-number.js +5 -4
- package/dist/plugins/sso.cjs +14 -13
- package/dist/plugins/sso.js +4 -3
- package/dist/plugins/two-factor.cjs +6 -5
- package/dist/plugins/two-factor.js +5 -4
- package/dist/plugins/username.cjs +6 -5
- package/dist/plugins/username.js +5 -4
- package/dist/plugins.cjs +45 -44
- package/dist/plugins.js +21 -20
- package/dist/social.cjs +3 -2
- package/dist/social.js +3 -2
- package/package.json +3 -3
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
var chunkBCGZXLBF_cjs = require('../chunk-BCGZXLBF.cjs');
|
|
4
4
|
require('../chunk-UQC2FUXC.cjs');
|
|
5
5
|
var chunkH74YRRNV_cjs = require('../chunk-H74YRRNV.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-EUROSDXK.cjs');
|
|
7
7
|
require('../chunk-NIMYOIVU.cjs');
|
|
8
8
|
require('../chunk-CCKQSGIR.cjs');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-LJFOH3ZP.cjs');
|
|
10
|
+
require('../chunk-VUQBJCJJ.cjs');
|
|
10
11
|
require('../chunk-OA7Z7IZT.cjs');
|
|
11
12
|
require('../chunk-2HPSCSV7.cjs');
|
|
12
13
|
require('../chunk-VXYIYABQ.cjs');
|
package/dist/adapters/drizzle.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { getAuthTables, withApplyDefault } from '../chunk-62MWLLEG.js';
|
|
2
2
|
import '../chunk-WZ6OIVJK.js';
|
|
3
3
|
import { generateId } from '../chunk-KLDFBLYL.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-6FWXNZZU.js';
|
|
5
5
|
import '../chunk-SK6Y2YH6.js';
|
|
6
6
|
import '../chunk-3XTQSPPA.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-VKN4655D.js';
|
|
8
|
+
import '../chunk-FGOOJHXQ.js';
|
|
8
9
|
import '../chunk-53IPO2PJ.js';
|
|
9
10
|
import '../chunk-FURNA6HY.js';
|
|
10
11
|
import '../chunk-TQQSPPNA.js';
|
package/dist/adapters/kysely.cjs
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
var chunkBCGZXLBF_cjs = require('../chunk-BCGZXLBF.cjs');
|
|
4
4
|
require('../chunk-UQC2FUXC.cjs');
|
|
5
5
|
require('../chunk-H74YRRNV.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-EUROSDXK.cjs');
|
|
7
7
|
require('../chunk-NIMYOIVU.cjs');
|
|
8
8
|
require('../chunk-CCKQSGIR.cjs');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-LJFOH3ZP.cjs');
|
|
10
|
+
require('../chunk-VUQBJCJJ.cjs');
|
|
10
11
|
require('../chunk-OA7Z7IZT.cjs');
|
|
11
12
|
require('../chunk-2HPSCSV7.cjs');
|
|
12
13
|
require('../chunk-VXYIYABQ.cjs');
|
package/dist/adapters/kysely.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { createKyselyAdapter, kyselyAdapter } from '../chunk-62MWLLEG.js';
|
|
2
2
|
import '../chunk-WZ6OIVJK.js';
|
|
3
3
|
import '../chunk-KLDFBLYL.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-6FWXNZZU.js';
|
|
5
5
|
import '../chunk-SK6Y2YH6.js';
|
|
6
6
|
import '../chunk-3XTQSPPA.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-VKN4655D.js';
|
|
8
|
+
import '../chunk-FGOOJHXQ.js';
|
|
8
9
|
import '../chunk-53IPO2PJ.js';
|
|
9
10
|
import '../chunk-FURNA6HY.js';
|
|
10
11
|
import '../chunk-TQQSPPNA.js';
|
package/dist/adapters/memory.cjs
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
var chunkBCGZXLBF_cjs = require('../chunk-BCGZXLBF.cjs');
|
|
4
4
|
require('../chunk-UQC2FUXC.cjs');
|
|
5
5
|
require('../chunk-H74YRRNV.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-EUROSDXK.cjs');
|
|
7
7
|
require('../chunk-NIMYOIVU.cjs');
|
|
8
8
|
require('../chunk-CCKQSGIR.cjs');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-LJFOH3ZP.cjs');
|
|
10
|
+
require('../chunk-VUQBJCJJ.cjs');
|
|
10
11
|
require('../chunk-OA7Z7IZT.cjs');
|
|
11
12
|
require('../chunk-2HPSCSV7.cjs');
|
|
12
13
|
require('../chunk-VXYIYABQ.cjs');
|
package/dist/adapters/memory.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { memoryAdapter } from '../chunk-62MWLLEG.js';
|
|
2
2
|
import '../chunk-WZ6OIVJK.js';
|
|
3
3
|
import '../chunk-KLDFBLYL.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-6FWXNZZU.js';
|
|
5
5
|
import '../chunk-SK6Y2YH6.js';
|
|
6
6
|
import '../chunk-3XTQSPPA.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-VKN4655D.js';
|
|
8
|
+
import '../chunk-FGOOJHXQ.js';
|
|
8
9
|
import '../chunk-53IPO2PJ.js';
|
|
9
10
|
import '../chunk-FURNA6HY.js';
|
|
10
11
|
import '../chunk-TQQSPPNA.js';
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
var chunkBCGZXLBF_cjs = require('../chunk-BCGZXLBF.cjs');
|
|
4
4
|
require('../chunk-UQC2FUXC.cjs');
|
|
5
5
|
require('../chunk-H74YRRNV.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-EUROSDXK.cjs');
|
|
7
7
|
require('../chunk-NIMYOIVU.cjs');
|
|
8
8
|
require('../chunk-CCKQSGIR.cjs');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-LJFOH3ZP.cjs');
|
|
10
|
+
require('../chunk-VUQBJCJJ.cjs');
|
|
10
11
|
require('../chunk-OA7Z7IZT.cjs');
|
|
11
12
|
require('../chunk-2HPSCSV7.cjs');
|
|
12
13
|
require('../chunk-VXYIYABQ.cjs');
|
package/dist/adapters/mongodb.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { getAuthTables, withApplyDefault } from '../chunk-62MWLLEG.js';
|
|
2
2
|
import '../chunk-WZ6OIVJK.js';
|
|
3
3
|
import '../chunk-KLDFBLYL.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-6FWXNZZU.js';
|
|
5
5
|
import '../chunk-SK6Y2YH6.js';
|
|
6
6
|
import '../chunk-3XTQSPPA.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-VKN4655D.js';
|
|
8
|
+
import '../chunk-FGOOJHXQ.js';
|
|
8
9
|
import '../chunk-53IPO2PJ.js';
|
|
9
10
|
import '../chunk-FURNA6HY.js';
|
|
10
11
|
import '../chunk-TQQSPPNA.js';
|
package/dist/adapters/prisma.cjs
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
var chunkBCGZXLBF_cjs = require('../chunk-BCGZXLBF.cjs');
|
|
4
4
|
require('../chunk-UQC2FUXC.cjs');
|
|
5
5
|
var chunkH74YRRNV_cjs = require('../chunk-H74YRRNV.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-EUROSDXK.cjs');
|
|
7
7
|
require('../chunk-NIMYOIVU.cjs');
|
|
8
8
|
require('../chunk-CCKQSGIR.cjs');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-LJFOH3ZP.cjs');
|
|
10
|
+
require('../chunk-VUQBJCJJ.cjs');
|
|
10
11
|
require('../chunk-OA7Z7IZT.cjs');
|
|
11
12
|
require('../chunk-2HPSCSV7.cjs');
|
|
12
13
|
require('../chunk-VXYIYABQ.cjs');
|
package/dist/adapters/prisma.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { getAuthTables, withApplyDefault } from '../chunk-62MWLLEG.js';
|
|
2
2
|
import '../chunk-WZ6OIVJK.js';
|
|
3
3
|
import { generateId } from '../chunk-KLDFBLYL.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-6FWXNZZU.js';
|
|
5
5
|
import '../chunk-SK6Y2YH6.js';
|
|
6
6
|
import '../chunk-3XTQSPPA.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-VKN4655D.js';
|
|
8
|
+
import '../chunk-FGOOJHXQ.js';
|
|
8
9
|
import '../chunk-53IPO2PJ.js';
|
|
9
10
|
import '../chunk-FURNA6HY.js';
|
|
10
11
|
import '../chunk-TQQSPPNA.js';
|
package/dist/adapters/test.cjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkH74YRRNV_cjs = require('../chunk-H74YRRNV.cjs');
|
|
4
|
-
require('../chunk-
|
|
4
|
+
require('../chunk-EUROSDXK.cjs');
|
|
5
5
|
require('../chunk-CCKQSGIR.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-LJFOH3ZP.cjs');
|
|
7
|
+
require('../chunk-VUQBJCJJ.cjs');
|
|
7
8
|
var vitest = require('vitest');
|
|
8
9
|
|
|
9
10
|
async function runAdapterTest(opts) {
|
package/dist/adapters/test.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { generateId } from '../chunk-KLDFBLYL.js';
|
|
2
|
-
import '../chunk-
|
|
2
|
+
import '../chunk-6FWXNZZU.js';
|
|
3
3
|
import '../chunk-3XTQSPPA.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-VKN4655D.js';
|
|
5
|
+
import '../chunk-FGOOJHXQ.js';
|
|
5
6
|
import { test, expect } from 'vitest';
|
|
6
7
|
|
|
7
8
|
async function runAdapterTest(opts) {
|
package/dist/api.cjs
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQJZQNVQ4_cjs = require('./chunk-QJZQNVQ4.cjs');
|
|
4
4
|
require('./chunk-NU4SXYJ5.cjs');
|
|
5
5
|
require('./chunk-V6RGXSG4.cjs');
|
|
6
6
|
require('./chunk-S5UORXJH.cjs');
|
|
7
7
|
require('./chunk-V6HE2MP7.cjs');
|
|
8
8
|
require('./chunk-UQC2FUXC.cjs');
|
|
9
9
|
require('./chunk-H74YRRNV.cjs');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-EUROSDXK.cjs');
|
|
11
11
|
require('./chunk-CCKQSGIR.cjs');
|
|
12
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-LJFOH3ZP.cjs');
|
|
13
|
+
require('./chunk-VUQBJCJJ.cjs');
|
|
13
14
|
require('./chunk-OA7Z7IZT.cjs');
|
|
14
15
|
require('./chunk-2HPSCSV7.cjs');
|
|
15
16
|
require('./chunk-VXYIYABQ.cjs');
|
|
@@ -19,157 +20,157 @@ require('./chunk-PEZRSDZS.cjs');
|
|
|
19
20
|
|
|
20
21
|
Object.defineProperty(exports, "APIError", {
|
|
21
22
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkQJZQNVQ4_cjs.APIError; }
|
|
23
24
|
});
|
|
24
25
|
Object.defineProperty(exports, "callbackOAuth", {
|
|
25
26
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkQJZQNVQ4_cjs.callbackOAuth; }
|
|
27
28
|
});
|
|
28
29
|
Object.defineProperty(exports, "changeEmail", {
|
|
29
30
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkQJZQNVQ4_cjs.changeEmail; }
|
|
31
32
|
});
|
|
32
33
|
Object.defineProperty(exports, "changePassword", {
|
|
33
34
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkQJZQNVQ4_cjs.changePassword; }
|
|
35
36
|
});
|
|
36
37
|
Object.defineProperty(exports, "createAuthEndpoint", {
|
|
37
38
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkQJZQNVQ4_cjs.createAuthEndpoint; }
|
|
39
40
|
});
|
|
40
41
|
Object.defineProperty(exports, "createAuthMiddleware", {
|
|
41
42
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkQJZQNVQ4_cjs.createAuthMiddleware; }
|
|
43
44
|
});
|
|
44
45
|
Object.defineProperty(exports, "createEmailVerificationToken", {
|
|
45
46
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkQJZQNVQ4_cjs.createEmailVerificationToken; }
|
|
47
48
|
});
|
|
48
49
|
Object.defineProperty(exports, "deleteUser", {
|
|
49
50
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkQJZQNVQ4_cjs.deleteUser; }
|
|
51
52
|
});
|
|
52
53
|
Object.defineProperty(exports, "deleteUserCallback", {
|
|
53
54
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkQJZQNVQ4_cjs.deleteUserCallback; }
|
|
55
56
|
});
|
|
56
57
|
Object.defineProperty(exports, "error", {
|
|
57
58
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkQJZQNVQ4_cjs.error; }
|
|
59
60
|
});
|
|
60
61
|
Object.defineProperty(exports, "forgetPassword", {
|
|
61
62
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkQJZQNVQ4_cjs.forgetPassword; }
|
|
63
64
|
});
|
|
64
65
|
Object.defineProperty(exports, "forgetPasswordCallback", {
|
|
65
66
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkQJZQNVQ4_cjs.forgetPasswordCallback; }
|
|
67
68
|
});
|
|
68
69
|
Object.defineProperty(exports, "freshSessionMiddleware", {
|
|
69
70
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkQJZQNVQ4_cjs.freshSessionMiddleware; }
|
|
71
72
|
});
|
|
72
73
|
Object.defineProperty(exports, "getEndpoints", {
|
|
73
74
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkQJZQNVQ4_cjs.getEndpoints; }
|
|
75
76
|
});
|
|
76
77
|
Object.defineProperty(exports, "getSession", {
|
|
77
78
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkQJZQNVQ4_cjs.getSession; }
|
|
79
80
|
});
|
|
80
81
|
Object.defineProperty(exports, "getSessionFromCtx", {
|
|
81
82
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkQJZQNVQ4_cjs.getSessionFromCtx; }
|
|
83
84
|
});
|
|
84
85
|
Object.defineProperty(exports, "linkSocialAccount", {
|
|
85
86
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkQJZQNVQ4_cjs.linkSocialAccount; }
|
|
87
88
|
});
|
|
88
89
|
Object.defineProperty(exports, "listSessions", {
|
|
89
90
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkQJZQNVQ4_cjs.listSessions; }
|
|
91
92
|
});
|
|
92
93
|
Object.defineProperty(exports, "listUserAccounts", {
|
|
93
94
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkQJZQNVQ4_cjs.listUserAccounts; }
|
|
95
96
|
});
|
|
96
97
|
Object.defineProperty(exports, "ok", {
|
|
97
98
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkQJZQNVQ4_cjs.ok; }
|
|
99
100
|
});
|
|
100
101
|
Object.defineProperty(exports, "optionsMiddleware", {
|
|
101
102
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkQJZQNVQ4_cjs.optionsMiddleware; }
|
|
103
104
|
});
|
|
104
105
|
Object.defineProperty(exports, "originCheck", {
|
|
105
106
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkQJZQNVQ4_cjs.originCheck; }
|
|
107
108
|
});
|
|
108
109
|
Object.defineProperty(exports, "originCheckMiddleware", {
|
|
109
110
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkQJZQNVQ4_cjs.originCheckMiddleware; }
|
|
111
112
|
});
|
|
112
113
|
Object.defineProperty(exports, "resetPassword", {
|
|
113
114
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunkQJZQNVQ4_cjs.resetPassword; }
|
|
115
116
|
});
|
|
116
117
|
Object.defineProperty(exports, "revokeOtherSessions", {
|
|
117
118
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkQJZQNVQ4_cjs.revokeOtherSessions; }
|
|
119
120
|
});
|
|
120
121
|
Object.defineProperty(exports, "revokeSession", {
|
|
121
122
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkQJZQNVQ4_cjs.revokeSession; }
|
|
123
124
|
});
|
|
124
125
|
Object.defineProperty(exports, "revokeSessions", {
|
|
125
126
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkQJZQNVQ4_cjs.revokeSessions; }
|
|
127
128
|
});
|
|
128
129
|
Object.defineProperty(exports, "router", {
|
|
129
130
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkQJZQNVQ4_cjs.router; }
|
|
131
132
|
});
|
|
132
133
|
Object.defineProperty(exports, "sendVerificationEmail", {
|
|
133
134
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkQJZQNVQ4_cjs.sendVerificationEmail; }
|
|
135
136
|
});
|
|
136
137
|
Object.defineProperty(exports, "sendVerificationEmailFn", {
|
|
137
138
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkQJZQNVQ4_cjs.sendVerificationEmailFn; }
|
|
139
140
|
});
|
|
140
141
|
Object.defineProperty(exports, "sessionMiddleware", {
|
|
141
142
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunkQJZQNVQ4_cjs.sessionMiddleware; }
|
|
143
144
|
});
|
|
144
145
|
Object.defineProperty(exports, "setPassword", {
|
|
145
146
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunkQJZQNVQ4_cjs.setPassword; }
|
|
147
148
|
});
|
|
148
149
|
Object.defineProperty(exports, "signInEmail", {
|
|
149
150
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
151
|
+
get: function () { return chunkQJZQNVQ4_cjs.signInEmail; }
|
|
151
152
|
});
|
|
152
153
|
Object.defineProperty(exports, "signInSocial", {
|
|
153
154
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
155
|
+
get: function () { return chunkQJZQNVQ4_cjs.signInSocial; }
|
|
155
156
|
});
|
|
156
157
|
Object.defineProperty(exports, "signOut", {
|
|
157
158
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
159
|
+
get: function () { return chunkQJZQNVQ4_cjs.signOut; }
|
|
159
160
|
});
|
|
160
161
|
Object.defineProperty(exports, "signUpEmail", {
|
|
161
162
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunkQJZQNVQ4_cjs.signUpEmail; }
|
|
163
164
|
});
|
|
164
165
|
Object.defineProperty(exports, "unlinkAccount", {
|
|
165
166
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunkQJZQNVQ4_cjs.unlinkAccount; }
|
|
167
168
|
});
|
|
168
169
|
Object.defineProperty(exports, "updateUser", {
|
|
169
170
|
enumerable: true,
|
|
170
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunkQJZQNVQ4_cjs.updateUser; }
|
|
171
172
|
});
|
|
172
173
|
Object.defineProperty(exports, "verifyEmail", {
|
|
173
174
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunkQJZQNVQ4_cjs.verifyEmail; }
|
|
175
176
|
});
|
package/dist/api.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
export { APIError, callbackOAuth, changeEmail, changePassword, createAuthEndpoint, createAuthMiddleware, createEmailVerificationToken, deleteUser, deleteUserCallback, error, forgetPassword, forgetPasswordCallback, freshSessionMiddleware, getEndpoints, getSession, getSessionFromCtx, linkSocialAccount, listSessions, listUserAccounts, ok, optionsMiddleware, originCheck, originCheckMiddleware, resetPassword, revokeOtherSessions, revokeSession, revokeSessions, router, sendVerificationEmail, sendVerificationEmailFn, sessionMiddleware, setPassword, signInEmail, signInSocial, signOut, signUpEmail, unlinkAccount, updateUser, verifyEmail } from './chunk-
|
|
1
|
+
export { APIError, callbackOAuth, changeEmail, changePassword, createAuthEndpoint, createAuthMiddleware, createEmailVerificationToken, deleteUser, deleteUserCallback, error, forgetPassword, forgetPasswordCallback, freshSessionMiddleware, getEndpoints, getSession, getSessionFromCtx, linkSocialAccount, listSessions, listUserAccounts, ok, optionsMiddleware, originCheck, originCheckMiddleware, resetPassword, revokeOtherSessions, revokeSession, revokeSessions, router, sendVerificationEmail, sendVerificationEmailFn, sessionMiddleware, setPassword, signInEmail, signInSocial, signOut, signUpEmail, unlinkAccount, updateUser, verifyEmail } from './chunk-LCVJ26NH.js';
|
|
2
2
|
import './chunk-VXDYNCOX.js';
|
|
3
3
|
import './chunk-GTQM7JU7.js';
|
|
4
4
|
import './chunk-XFCIANZX.js';
|
|
5
5
|
import './chunk-QQGZ3XGI.js';
|
|
6
6
|
import './chunk-WZ6OIVJK.js';
|
|
7
7
|
import './chunk-KLDFBLYL.js';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-6FWXNZZU.js';
|
|
9
9
|
import './chunk-3XTQSPPA.js';
|
|
10
|
-
import './chunk-
|
|
10
|
+
import './chunk-VKN4655D.js';
|
|
11
|
+
import './chunk-FGOOJHXQ.js';
|
|
11
12
|
import './chunk-53IPO2PJ.js';
|
|
12
13
|
import './chunk-FURNA6HY.js';
|
|
13
14
|
import './chunk-TQQSPPNA.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createAuthEndpoint, createAuthMiddleware, APIError, getSessionFromCtx } from './chunk-
|
|
1
|
+
import { createAuthEndpoint, createAuthMiddleware, APIError, getSessionFromCtx } from './chunk-LCVJ26NH.js';
|
|
2
2
|
import { getOrigin } from './chunk-XFCIANZX.js';
|
|
3
3
|
import { setSessionCookie, parseSetCookieHeader } from './chunk-QQGZ3XGI.js';
|
|
4
4
|
import { mergeSchema } from './chunk-WZ6OIVJK.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createAuthEndpoint, APIError } from './chunk-
|
|
1
|
+
import { createAuthEndpoint, APIError } from './chunk-LCVJ26NH.js';
|
|
2
2
|
import { setSessionCookie } from './chunk-QQGZ3XGI.js';
|
|
3
|
-
import { generateRandomString } from './chunk-
|
|
3
|
+
import { generateRandomString } from './chunk-FGOOJHXQ.js';
|
|
4
4
|
import { getDate } from './chunk-FURNA6HY.js';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createAuthEndpoint, BASE_ERROR_CODES, getSessionFromCtx } from './chunk-
|
|
1
|
+
import { createAuthEndpoint, BASE_ERROR_CODES, getSessionFromCtx } from './chunk-LCVJ26NH.js';
|
|
2
2
|
import { setSessionCookie } from './chunk-QQGZ3XGI.js';
|
|
3
3
|
import { mergeSchema } from './chunk-WZ6OIVJK.js';
|
|
4
|
-
import { generateRandomString } from './chunk-
|
|
4
|
+
import { generateRandomString } from './chunk-FGOOJHXQ.js';
|
|
5
5
|
import { getDate } from './chunk-FURNA6HY.js';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { APIError } from 'better-call';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createAuthMiddleware, getSessionFromCtx, APIError, createAuthEndpoint } from './chunk-
|
|
1
|
+
import { createAuthMiddleware, getSessionFromCtx, APIError, createAuthEndpoint } from './chunk-LCVJ26NH.js';
|
|
2
2
|
import { deleteSessionCookie, setSessionCookie } from './chunk-QQGZ3XGI.js';
|
|
3
3
|
import { mergeSchema } from './chunk-WZ6OIVJK.js';
|
|
4
4
|
import { getDate } from './chunk-FURNA6HY.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQJZQNVQ4_cjs = require('./chunk-QJZQNVQ4.cjs');
|
|
4
4
|
var chunkV6HE2MP7_cjs = require('./chunk-V6HE2MP7.cjs');
|
|
5
5
|
var zod = require('zod');
|
|
6
6
|
var jose = require('jose');
|
|
@@ -14,7 +14,7 @@ function toBoolean(value) {
|
|
|
14
14
|
var oneTap = (options) => ({
|
|
15
15
|
id: "one-tap",
|
|
16
16
|
endpoints: {
|
|
17
|
-
oneTapCallback:
|
|
17
|
+
oneTapCallback: chunkQJZQNVQ4_cjs.createAuthEndpoint(
|
|
18
18
|
"/one-tap/callback",
|
|
19
19
|
{
|
|
20
20
|
method: "POST",
|
|
@@ -70,7 +70,7 @@ var oneTap = (options) => ({
|
|
|
70
70
|
);
|
|
71
71
|
payload = verifiedPayload;
|
|
72
72
|
} catch (error) {
|
|
73
|
-
throw new
|
|
73
|
+
throw new chunkQJZQNVQ4_cjs.APIError("BAD_REQUEST", {
|
|
74
74
|
message: "invalid id token"
|
|
75
75
|
});
|
|
76
76
|
}
|
|
@@ -81,7 +81,7 @@ var oneTap = (options) => ({
|
|
|
81
81
|
const user = await ctx.context.internalAdapter.findUserByEmail(email);
|
|
82
82
|
if (!user) {
|
|
83
83
|
if (options?.disableSignup) {
|
|
84
|
-
throw new
|
|
84
|
+
throw new chunkQJZQNVQ4_cjs.APIError("BAD_GATEWAY", {
|
|
85
85
|
message: "User not found"
|
|
86
86
|
});
|
|
87
87
|
}
|
|
@@ -98,7 +98,7 @@ var oneTap = (options) => ({
|
|
|
98
98
|
}
|
|
99
99
|
);
|
|
100
100
|
if (!newUser) {
|
|
101
|
-
throw new
|
|
101
|
+
throw new chunkQJZQNVQ4_cjs.APIError("INTERNAL_SERVER_ERROR", {
|
|
102
102
|
message: "Could not create user"
|
|
103
103
|
});
|
|
104
104
|
}
|
|
@@ -125,7 +125,7 @@ var oneTap = (options) => ({
|
|
|
125
125
|
}
|
|
126
126
|
const account = await ctx.context.internalAdapter.findAccount(sub);
|
|
127
127
|
if (!account) {
|
|
128
|
-
throw new
|
|
128
|
+
throw new chunkQJZQNVQ4_cjs.APIError("UNAUTHORIZED", {
|
|
129
129
|
message: "Google sub doesn't match"
|
|
130
130
|
});
|
|
131
131
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQJZQNVQ4_cjs = require('./chunk-QJZQNVQ4.cjs');
|
|
4
4
|
var chunkV6HE2MP7_cjs = require('./chunk-V6HE2MP7.cjs');
|
|
5
5
|
var chunkUQC2FUXC_cjs = require('./chunk-UQC2FUXC.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkVUQBJCJJ_cjs = require('./chunk-VUQBJCJJ.cjs');
|
|
7
7
|
var chunk2HPSCSV7_cjs = require('./chunk-2HPSCSV7.cjs');
|
|
8
8
|
var zod = require('zod');
|
|
9
9
|
var betterCall = require('better-call');
|
|
10
10
|
|
|
11
11
|
function generateOTP(size) {
|
|
12
|
-
return
|
|
12
|
+
return chunkVUQBJCJJ_cjs.generateRandomString(size, "0-9");
|
|
13
13
|
}
|
|
14
14
|
var phoneNumber = (options) => {
|
|
15
15
|
const opts = {
|
|
@@ -30,7 +30,7 @@ var phoneNumber = (options) => {
|
|
|
30
30
|
return {
|
|
31
31
|
id: "phone-number",
|
|
32
32
|
endpoints: {
|
|
33
|
-
signInPhoneNumber:
|
|
33
|
+
signInPhoneNumber: chunkQJZQNVQ4_cjs.createAuthEndpoint(
|
|
34
34
|
"/sign-in/phone-number",
|
|
35
35
|
{
|
|
36
36
|
method: "POST",
|
|
@@ -138,7 +138,7 @@ var phoneNumber = (options) => {
|
|
|
138
138
|
if (!session) {
|
|
139
139
|
ctx.context.logger.error("Failed to create session");
|
|
140
140
|
throw new betterCall.APIError("UNAUTHORIZED", {
|
|
141
|
-
message:
|
|
141
|
+
message: chunkQJZQNVQ4_cjs.BASE_ERROR_CODES.FAILED_TO_CREATE_SESSION
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
await chunkV6HE2MP7_cjs.setSessionCookie(
|
|
@@ -165,7 +165,7 @@ var phoneNumber = (options) => {
|
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
167
|
),
|
|
168
|
-
sendPhoneNumberOTP:
|
|
168
|
+
sendPhoneNumberOTP: chunkQJZQNVQ4_cjs.createAuthEndpoint(
|
|
169
169
|
"/phone-number/send-otp",
|
|
170
170
|
{
|
|
171
171
|
method: "POST",
|
|
@@ -238,7 +238,7 @@ var phoneNumber = (options) => {
|
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
240
|
),
|
|
241
|
-
verifyPhoneNumber:
|
|
241
|
+
verifyPhoneNumber: chunkQJZQNVQ4_cjs.createAuthEndpoint(
|
|
242
242
|
"/phone-number/verify",
|
|
243
243
|
{
|
|
244
244
|
method: "POST",
|
|
@@ -323,10 +323,10 @@ var phoneNumber = (options) => {
|
|
|
323
323
|
}
|
|
324
324
|
await ctx.context.internalAdapter.deleteVerificationValue(otp.id);
|
|
325
325
|
if (ctx.body.updatePhoneNumber) {
|
|
326
|
-
const session = await
|
|
326
|
+
const session = await chunkQJZQNVQ4_cjs.getSessionFromCtx(ctx);
|
|
327
327
|
if (!session) {
|
|
328
328
|
throw new betterCall.APIError("UNAUTHORIZED", {
|
|
329
|
-
message:
|
|
329
|
+
message: chunkQJZQNVQ4_cjs.BASE_ERROR_CODES.USER_NOT_FOUND
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
332
|
let user2 = await ctx.context.internalAdapter.updateUser(
|
|
@@ -375,7 +375,7 @@ var phoneNumber = (options) => {
|
|
|
375
375
|
});
|
|
376
376
|
if (!user) {
|
|
377
377
|
throw new betterCall.APIError("INTERNAL_SERVER_ERROR", {
|
|
378
|
-
message:
|
|
378
|
+
message: chunkQJZQNVQ4_cjs.BASE_ERROR_CODES.FAILED_TO_CREATE_USER
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
381
|
}
|
|
@@ -396,7 +396,7 @@ var phoneNumber = (options) => {
|
|
|
396
396
|
);
|
|
397
397
|
if (!user) {
|
|
398
398
|
throw new betterCall.APIError("INTERNAL_SERVER_ERROR", {
|
|
399
|
-
message:
|
|
399
|
+
message: chunkQJZQNVQ4_cjs.BASE_ERROR_CODES.FAILED_TO_UPDATE_USER
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
if (!ctx.body.disableSession) {
|
|
@@ -406,7 +406,7 @@ var phoneNumber = (options) => {
|
|
|
406
406
|
);
|
|
407
407
|
if (!session) {
|
|
408
408
|
throw new betterCall.APIError("INTERNAL_SERVER_ERROR", {
|
|
409
|
-
message:
|
|
409
|
+
message: chunkQJZQNVQ4_cjs.BASE_ERROR_CODES.FAILED_TO_CREATE_SESSION
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
412
|
await chunkV6HE2MP7_cjs.setSessionCookie(ctx, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createAuthEndpoint, APIError, getEndpoints } from './chunk-
|
|
1
|
+
import { createAuthEndpoint, APIError, getEndpoints } from './chunk-LCVJ26NH.js';
|
|
2
2
|
import { getAuthTables } from './chunk-62MWLLEG.js';
|
|
3
3
|
import { ZodObject, ZodSchema, ZodOptional } from 'zod';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createAuthEndpoint, APIError } from './chunk-
|
|
1
|
+
import { createAuthEndpoint, APIError } from './chunk-LCVJ26NH.js';
|
|
2
2
|
import { setSessionCookie } from './chunk-QQGZ3XGI.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { createRemoteJWKSet, jwtVerify } from 'jose';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkVUQBJCJJ_cjs = require('./chunk-VUQBJCJJ.cjs');
|
|
4
4
|
var zod = require('zod');
|
|
5
5
|
var betterCall = require('better-call');
|
|
6
6
|
|
|
@@ -11,8 +11,8 @@ async function generateState(c, link) {
|
|
|
11
11
|
message: "callbackURL is required"
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
const codeVerifier =
|
|
15
|
-
const state =
|
|
14
|
+
const codeVerifier = chunkVUQBJCJJ_cjs.generateRandomString(128);
|
|
15
|
+
const state = chunkVUQBJCJJ_cjs.generateRandomString(32);
|
|
16
16
|
const data = JSON.stringify({
|
|
17
17
|
callbackURL,
|
|
18
18
|
codeVerifier,
|