better-auth 1.2.8-beta.5 → 1.2.8-beta.6
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 +2 -3
- package/dist/adapters/drizzle-adapter/index.d.mts +2 -3
- package/dist/adapters/drizzle-adapter/index.d.ts +2 -3
- package/dist/adapters/index.d.cts +3 -4
- package/dist/adapters/index.d.mts +3 -4
- package/dist/adapters/index.d.ts +3 -4
- package/dist/adapters/kysely-adapter/index.cjs +1 -1
- package/dist/adapters/kysely-adapter/index.d.cts +2 -3
- package/dist/adapters/kysely-adapter/index.d.mts +2 -3
- package/dist/adapters/kysely-adapter/index.d.ts +2 -3
- package/dist/adapters/kysely-adapter/index.mjs +1 -1
- package/dist/adapters/memory-adapter/index.d.cts +2 -3
- package/dist/adapters/memory-adapter/index.d.mts +2 -3
- package/dist/adapters/memory-adapter/index.d.ts +2 -3
- package/dist/adapters/mongodb-adapter/index.d.cts +1 -2
- package/dist/adapters/mongodb-adapter/index.d.mts +1 -2
- package/dist/adapters/mongodb-adapter/index.d.ts +1 -2
- package/dist/adapters/prisma-adapter/index.d.cts +2 -3
- package/dist/adapters/prisma-adapter/index.d.mts +2 -3
- package/dist/adapters/prisma-adapter/index.d.ts +2 -3
- package/dist/adapters/test.d.cts +1 -2
- package/dist/adapters/test.d.mts +1 -2
- package/dist/adapters/test.d.ts +1 -2
- package/dist/api/index.cjs +79 -77
- package/dist/api/index.d.cts +1 -2
- package/dist/api/index.d.mts +1 -2
- package/dist/api/index.d.ts +1 -2
- package/dist/api/index.mjs +6 -5
- package/dist/client/index.d.cts +1 -2
- package/dist/client/index.d.mts +1 -2
- package/dist/client/index.d.ts +1 -2
- package/dist/client/plugins/index.d.cts +2 -3
- package/dist/client/plugins/index.d.mts +2 -3
- package/dist/client/plugins/index.d.ts +2 -3
- package/dist/client/react/index.d.cts +1 -2
- package/dist/client/react/index.d.mts +1 -2
- package/dist/client/react/index.d.ts +1 -2
- package/dist/client/solid/index.d.cts +1 -2
- package/dist/client/solid/index.d.mts +1 -2
- package/dist/client/solid/index.d.ts +1 -2
- package/dist/client/svelte/index.d.cts +1 -2
- package/dist/client/svelte/index.d.mts +1 -2
- package/dist/client/svelte/index.d.ts +1 -2
- package/dist/client/vue/index.d.cts +1 -2
- package/dist/client/vue/index.d.mts +1 -2
- package/dist/client/vue/index.d.ts +1 -2
- package/dist/cookies/index.d.cts +1 -2
- package/dist/cookies/index.d.mts +1 -2
- package/dist/cookies/index.d.ts +1 -2
- package/dist/db/index.cjs +2 -2
- package/dist/db/index.d.cts +2 -3
- package/dist/db/index.d.mts +2 -3
- package/dist/db/index.d.ts +2 -3
- package/dist/db/index.mjs +2 -2
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +2 -3
- package/dist/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.mjs +4 -4
- package/dist/integrations/next-js.cjs +3 -3
- package/dist/integrations/next-js.d.cts +1 -2
- package/dist/integrations/next-js.d.mts +1 -2
- package/dist/integrations/next-js.d.ts +1 -2
- package/dist/integrations/next-js.mjs +2 -2
- package/dist/integrations/node.d.cts +1 -2
- package/dist/integrations/node.d.mts +1 -2
- package/dist/integrations/node.d.ts +1 -2
- package/dist/integrations/react-start.cjs +3 -3
- package/dist/integrations/react-start.d.cts +1 -2
- package/dist/integrations/react-start.d.mts +1 -2
- package/dist/integrations/react-start.d.ts +1 -2
- package/dist/integrations/react-start.mjs +2 -2
- package/dist/integrations/svelte-kit.d.cts +1 -2
- package/dist/integrations/svelte-kit.d.mts +1 -2
- package/dist/integrations/svelte-kit.d.ts +1 -2
- package/dist/oauth2/index.d.cts +2 -3
- package/dist/oauth2/index.d.mts +2 -3
- package/dist/oauth2/index.d.ts +2 -3
- package/dist/plugins/admin/index.cjs +2 -2
- package/dist/plugins/admin/index.d.cts +3 -4
- package/dist/plugins/admin/index.d.mts +3 -4
- package/dist/plugins/admin/index.d.ts +3 -4
- package/dist/plugins/admin/index.mjs +2 -2
- package/dist/plugins/anonymous/index.cjs +7 -6
- package/dist/plugins/anonymous/index.d.cts +10 -2
- package/dist/plugins/anonymous/index.d.mts +10 -2
- package/dist/plugins/anonymous/index.d.ts +10 -2
- package/dist/plugins/anonymous/index.mjs +4 -3
- package/dist/plugins/bearer/index.cjs +3 -3
- package/dist/plugins/bearer/index.d.cts +1 -2
- package/dist/plugins/bearer/index.d.mts +1 -2
- package/dist/plugins/bearer/index.d.ts +1 -2
- package/dist/plugins/bearer/index.mjs +1 -1
- package/dist/plugins/captcha/index.d.cts +1 -2
- package/dist/plugins/captcha/index.d.mts +1 -2
- package/dist/plugins/captcha/index.d.ts +1 -2
- package/dist/plugins/custom-session/index.cjs +3 -3
- package/dist/plugins/custom-session/index.d.cts +1 -2
- package/dist/plugins/custom-session/index.d.mts +1 -2
- package/dist/plugins/custom-session/index.d.ts +1 -2
- package/dist/plugins/custom-session/index.mjs +1 -1
- package/dist/plugins/email-otp/index.cjs +12 -12
- package/dist/plugins/email-otp/index.d.cts +1 -2
- package/dist/plugins/email-otp/index.d.mts +1 -2
- package/dist/plugins/email-otp/index.d.ts +1 -2
- package/dist/plugins/email-otp/index.mjs +4 -4
- package/dist/plugins/generic-oauth/index.cjs +7 -7
- package/dist/plugins/generic-oauth/index.d.cts +1 -2
- package/dist/plugins/generic-oauth/index.d.mts +1 -2
- package/dist/plugins/generic-oauth/index.d.ts +1 -2
- package/dist/plugins/generic-oauth/index.mjs +1 -1
- package/dist/plugins/haveibeenpwned/index.cjs +1 -1
- package/dist/plugins/haveibeenpwned/index.d.cts +1 -2
- package/dist/plugins/haveibeenpwned/index.d.mts +1 -2
- package/dist/plugins/haveibeenpwned/index.d.ts +1 -2
- package/dist/plugins/haveibeenpwned/index.mjs +1 -1
- package/dist/plugins/index.cjs +21 -21
- package/dist/plugins/index.d.cts +2 -3
- package/dist/plugins/index.d.mts +2 -3
- package/dist/plugins/index.d.ts +2 -3
- package/dist/plugins/index.mjs +5 -5
- package/dist/plugins/jwt/index.cjs +5 -5
- package/dist/plugins/jwt/index.d.cts +1 -2
- package/dist/plugins/jwt/index.d.mts +1 -2
- package/dist/plugins/jwt/index.d.ts +1 -2
- package/dist/plugins/jwt/index.mjs +1 -1
- package/dist/plugins/magic-link/index.cjs +6 -6
- package/dist/plugins/magic-link/index.mjs +2 -2
- package/dist/plugins/multi-session/index.cjs +8 -8
- package/dist/plugins/multi-session/index.d.cts +1 -2
- package/dist/plugins/multi-session/index.d.mts +1 -2
- package/dist/plugins/multi-session/index.d.ts +1 -2
- package/dist/plugins/multi-session/index.mjs +1 -1
- package/dist/plugins/oauth-proxy/index.cjs +5 -5
- package/dist/plugins/oauth-proxy/index.d.cts +1 -2
- package/dist/plugins/oauth-proxy/index.d.mts +1 -2
- package/dist/plugins/oauth-proxy/index.d.ts +1 -2
- package/dist/plugins/oauth-proxy/index.mjs +1 -1
- package/dist/plugins/oidc-provider/index.cjs +13 -13
- package/dist/plugins/oidc-provider/index.d.cts +1 -2
- package/dist/plugins/oidc-provider/index.d.mts +1 -2
- package/dist/plugins/oidc-provider/index.d.ts +1 -2
- package/dist/plugins/oidc-provider/index.mjs +1 -1
- package/dist/plugins/one-tap/index.cjs +4 -4
- package/dist/plugins/one-tap/index.mjs +3 -3
- package/dist/plugins/one-time-token/index.cjs +5 -5
- package/dist/plugins/one-time-token/index.d.cts +1 -2
- package/dist/plugins/one-time-token/index.d.mts +1 -2
- package/dist/plugins/one-time-token/index.d.ts +1 -2
- package/dist/plugins/one-time-token/index.mjs +2 -2
- package/dist/plugins/open-api/index.cjs +3 -3
- package/dist/plugins/open-api/index.d.cts +1 -2
- package/dist/plugins/open-api/index.d.mts +1 -2
- package/dist/plugins/open-api/index.d.ts +1 -2
- package/dist/plugins/open-api/index.mjs +1 -1
- package/dist/plugins/organization/index.cjs +2 -2
- package/dist/plugins/organization/index.d.cts +2 -2
- package/dist/plugins/organization/index.d.mts +2 -2
- package/dist/plugins/organization/index.d.ts +2 -2
- package/dist/plugins/organization/index.mjs +2 -2
- package/dist/plugins/passkey/index.cjs +15 -15
- package/dist/plugins/passkey/index.d.cts +1 -2
- package/dist/plugins/passkey/index.d.mts +1 -2
- package/dist/plugins/passkey/index.d.ts +1 -2
- package/dist/plugins/passkey/index.mjs +2 -2
- package/dist/plugins/phone-number/index.cjs +14 -14
- package/dist/plugins/phone-number/index.d.cts +1 -2
- package/dist/plugins/phone-number/index.d.mts +1 -2
- package/dist/plugins/phone-number/index.d.ts +1 -2
- package/dist/plugins/phone-number/index.mjs +3 -3
- package/dist/plugins/sso/index.cjs +6 -6
- package/dist/plugins/sso/index.d.cts +1 -2
- package/dist/plugins/sso/index.d.mts +1 -2
- package/dist/plugins/sso/index.d.ts +1 -2
- package/dist/plugins/sso/index.mjs +1 -1
- package/dist/plugins/two-factor/index.cjs +25 -25
- package/dist/plugins/two-factor/index.d.cts +1 -2
- package/dist/plugins/two-factor/index.d.mts +1 -2
- package/dist/plugins/two-factor/index.d.ts +1 -2
- package/dist/plugins/two-factor/index.mjs +6 -6
- package/dist/plugins/username/index.cjs +10 -10
- package/dist/plugins/username/index.d.cts +1 -2
- package/dist/plugins/username/index.d.mts +1 -2
- package/dist/plugins/username/index.d.ts +1 -2
- package/dist/plugins/username/index.mjs +2 -2
- package/dist/shared/{better-auth.DOJYkooL.d.mts → better-auth.345hEx94.d.cts} +1 -1
- package/dist/shared/{better-auth.DWHYF1zb.d.mts → better-auth.B-fvTvBt.d.mts} +1 -1
- package/dist/shared/{better-auth.DcYHYdSr.mjs → better-auth.B0PuwKEL.mjs} +22 -11
- package/dist/shared/{better-auth.D6n2BM2j.d.cts → better-auth.B0UoRWG9.d.cts} +1 -1
- package/dist/shared/{better-auth.BZRaTIwt.d.ts → better-auth.BEXh0Yfx.d.ts} +1 -1
- package/dist/shared/{better-auth.4AOoWsWt.cjs → better-auth.BJiRPytD.cjs} +0 -9
- package/dist/shared/{better-auth.DH3y_izw.d.cts → better-auth.BZj5bcIv.d.cts} +413 -5
- package/dist/shared/{better-auth.BI9PwjHN.cjs → better-auth.Bp3dnvEl.cjs} +41 -30
- package/dist/shared/{better-auth.hVRuraA_.d.ts → better-auth.C9V-i-W4.d.ts} +1 -1
- package/dist/shared/{better-auth.s9jQKDI8.d.mts → better-auth.CDeExxQS.d.mts} +413 -5
- package/dist/shared/{better-auth.C-pOcaA8.mjs → better-auth.Cd_A6t3-.mjs} +5 -5
- package/dist/shared/{better-auth.Da6_deha.mjs → better-auth.DKF2BM5s.mjs} +0 -9
- package/dist/shared/{better-auth.Dahkdi9Z.d.cts → better-auth.DKdkqLRU.d.mts} +1 -1
- package/dist/shared/{better-auth.BiOsDr1_.d.mts → better-auth.Dp7AeJty.d.mts} +1 -1
- package/dist/shared/{better-auth.bGngF9WG.cjs → better-auth.IF8Wj_xM.cjs} +39 -38
- package/dist/shared/{better-auth.B4GrHyoP.mjs → better-auth.TKj1bZrD.mjs} +3 -2
- package/dist/shared/{better-auth.C71O0JQF.mjs → better-auth.VFdNP2fm.mjs} +137 -9
- package/dist/shared/{better-auth.DEruvHER.d.ts → better-auth.dkazx1HL.d.ts} +413 -5
- package/dist/shared/{better-auth.DZ-QPO4D.d.cts → better-auth.jD93qavQ.d.cts} +1 -1
- package/dist/shared/{better-auth.ogBjk2_R.cjs → better-auth.jkkUo-gB.cjs} +5 -5
- package/dist/shared/{better-auth.DWZaGq-n.d.ts → better-auth.qiXm3ePU.d.ts} +1 -1
- package/dist/shared/{better-auth.DnKeVZ5H.cjs → better-auth.r0iyl8Tx.cjs} +137 -8
- package/dist/types/index.d.cts +2 -3
- package/dist/types/index.d.mts +2 -3
- package/dist/types/index.d.ts +2 -3
- package/package.json +15 -16
- package/dist/chunks/bun-sqlite-dialect.cjs +0 -170
- package/dist/chunks/bun-sqlite-dialect.mjs +0 -164
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.BZj5bcIv.cjs';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.B0UoRWG9.cjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.7QibuQ0I.cjs';
|
|
@@ -7,7 +7,6 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
interface DB {
|
|
13
12
|
[key: string]: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.CDeExxQS.mjs';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.Dp7AeJty.mjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.C39-x5Oo.mjs';
|
|
@@ -7,7 +7,6 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
interface DB {
|
|
13
12
|
[key: string]: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.dkazx1HL.js';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.C9V-i-W4.js';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.CpEzqKmn.js';
|
|
@@ -7,7 +7,6 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
interface DB {
|
|
13
12
|
[key: string]: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.
|
|
2
|
-
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.
|
|
3
|
-
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.BZj5bcIv.cjs';
|
|
2
|
+
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.B0UoRWG9.cjs';
|
|
3
|
+
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.B0UoRWG9.cjs';
|
|
4
4
|
import '../shared/better-auth.CYegVoq1.cjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../shared/better-auth.7QibuQ0I.cjs';
|
|
@@ -8,7 +8,6 @@ import 'jose';
|
|
|
8
8
|
import 'kysely';
|
|
9
9
|
import 'better-call';
|
|
10
10
|
import 'better-sqlite3';
|
|
11
|
-
import 'bun:sqlite';
|
|
12
11
|
|
|
13
12
|
declare const createAdapter: ({ adapter, config: cfg, }: {
|
|
14
13
|
config: AdapterConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.
|
|
2
|
-
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.
|
|
3
|
-
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.CDeExxQS.mjs';
|
|
2
|
+
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.Dp7AeJty.mjs';
|
|
3
|
+
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.Dp7AeJty.mjs';
|
|
4
4
|
import '../shared/better-auth.CYegVoq1.mjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../shared/better-auth.C39-x5Oo.mjs';
|
|
@@ -8,7 +8,6 @@ import 'jose';
|
|
|
8
8
|
import 'kysely';
|
|
9
9
|
import 'better-call';
|
|
10
10
|
import 'better-sqlite3';
|
|
11
|
-
import 'bun:sqlite';
|
|
12
11
|
|
|
13
12
|
declare const createAdapter: ({ adapter, config: cfg, }: {
|
|
14
13
|
config: AdapterConfig;
|
package/dist/adapters/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.
|
|
2
|
-
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.
|
|
3
|
-
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.dkazx1HL.js';
|
|
2
|
+
import { a as AdapterConfig, C as CreateCustomAdapter } from '../shared/better-auth.C9V-i-W4.js';
|
|
3
|
+
export { A as AdapterDebugLogs, d as AdapterTestDebugLogs, c as CleanedWhere, b as CustomAdapter } from '../shared/better-auth.C9V-i-W4.js';
|
|
4
4
|
import '../shared/better-auth.CYegVoq1.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../shared/better-auth.CpEzqKmn.js';
|
|
@@ -8,7 +8,6 @@ import 'jose';
|
|
|
8
8
|
import 'kysely';
|
|
9
9
|
import 'better-call';
|
|
10
10
|
import 'better-sqlite3';
|
|
11
|
-
import 'bun:sqlite';
|
|
12
11
|
|
|
13
12
|
declare const createAdapter: ({ adapter, config: cfg, }: {
|
|
14
13
|
config: AdapterConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const kyselyAdapter = require('../../shared/better-auth.
|
|
3
|
+
const kyselyAdapter = require('../../shared/better-auth.BJiRPytD.cjs');
|
|
4
4
|
require('kysely');
|
|
5
5
|
require('../../shared/better-auth.BLnaKDpp.cjs');
|
|
6
6
|
require('../../shared/better-auth.D3mtHEZg.cjs');
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Kysely } from 'kysely';
|
|
2
|
-
import { f as BetterAuthOptions, K as KyselyDatabaseType, g as Adapter } from '../../shared/better-auth.
|
|
3
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
2
|
+
import { f as BetterAuthOptions, K as KyselyDatabaseType, g as Adapter } from '../../shared/better-auth.BZj5bcIv.cjs';
|
|
3
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.B0UoRWG9.cjs';
|
|
4
4
|
import '../../shared/better-auth.CYegVoq1.cjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../../shared/better-auth.7QibuQ0I.cjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
declare const createKyselyAdapter: (config: BetterAuthOptions) => Promise<{
|
|
13
12
|
kysely: Kysely<any> | null;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Kysely } from 'kysely';
|
|
2
|
-
import { f as BetterAuthOptions, K as KyselyDatabaseType, g as Adapter } from '../../shared/better-auth.
|
|
3
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
2
|
+
import { f as BetterAuthOptions, K as KyselyDatabaseType, g as Adapter } from '../../shared/better-auth.CDeExxQS.mjs';
|
|
3
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.Dp7AeJty.mjs';
|
|
4
4
|
import '../../shared/better-auth.CYegVoq1.mjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../../shared/better-auth.C39-x5Oo.mjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
declare const createKyselyAdapter: (config: BetterAuthOptions) => Promise<{
|
|
13
12
|
kysely: Kysely<any> | null;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Kysely } from 'kysely';
|
|
2
|
-
import { f as BetterAuthOptions, K as KyselyDatabaseType, g as Adapter } from '../../shared/better-auth.
|
|
3
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
2
|
+
import { f as BetterAuthOptions, K as KyselyDatabaseType, g as Adapter } from '../../shared/better-auth.dkazx1HL.js';
|
|
3
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.C9V-i-W4.js';
|
|
4
4
|
import '../../shared/better-auth.CYegVoq1.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '../../shared/better-auth.CpEzqKmn.js';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
declare const createKyselyAdapter: (config: BetterAuthOptions) => Promise<{
|
|
13
12
|
kysely: Kysely<any> | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as createKyselyAdapter, k as kyselyAdapter } from '../../shared/better-auth.
|
|
1
|
+
export { c as createKyselyAdapter, k as kyselyAdapter } from '../../shared/better-auth.DKF2BM5s.mjs';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import '../../shared/better-auth.Du54XGQ5.mjs';
|
|
4
4
|
import '../../shared/better-auth.tB5eU6EY.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.BZj5bcIv.cjs';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.B0UoRWG9.cjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.7QibuQ0I.cjs';
|
|
@@ -7,7 +7,6 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
interface MemoryDB {
|
|
13
12
|
[key: string]: any[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.CDeExxQS.mjs';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.Dp7AeJty.mjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.C39-x5Oo.mjs';
|
|
@@ -7,7 +7,6 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
interface MemoryDB {
|
|
13
12
|
[key: string]: any[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.dkazx1HL.js';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.C9V-i-W4.js';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.CpEzqKmn.js';
|
|
@@ -7,7 +7,6 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
interface MemoryDB {
|
|
13
12
|
[key: string]: any[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Db } from 'mongodb';
|
|
2
|
-
import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.
|
|
2
|
+
import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.BZj5bcIv.cjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.7QibuQ0I.cjs';
|
|
@@ -7,7 +7,6 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
declare const mongodbAdapter: (db: Db) => (options: BetterAuthOptions) => {
|
|
13
12
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Db } from 'mongodb';
|
|
2
|
-
import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.
|
|
2
|
+
import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.CDeExxQS.mjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.C39-x5Oo.mjs';
|
|
@@ -7,7 +7,6 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
declare const mongodbAdapter: (db: Db) => (options: BetterAuthOptions) => {
|
|
13
12
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Db } from 'mongodb';
|
|
2
|
-
import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.
|
|
2
|
+
import { f as BetterAuthOptions, W as Where } from '../../shared/better-auth.dkazx1HL.js';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.CpEzqKmn.js';
|
|
@@ -7,7 +7,6 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
declare const mongodbAdapter: (db: Db) => (options: BetterAuthOptions) => {
|
|
13
12
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.BZj5bcIv.cjs';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.B0UoRWG9.cjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.7QibuQ0I.cjs';
|
|
@@ -7,7 +7,6 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
interface PrismaConfig {
|
|
13
12
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.CDeExxQS.mjs';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.Dp7AeJty.mjs';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.C39-x5Oo.mjs';
|
|
@@ -7,7 +7,6 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
interface PrismaConfig {
|
|
13
12
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.
|
|
2
|
-
import { A as AdapterDebugLogs } from '../../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../../shared/better-auth.dkazx1HL.js';
|
|
2
|
+
import { A as AdapterDebugLogs } from '../../shared/better-auth.C9V-i-W4.js';
|
|
3
3
|
import '../../shared/better-auth.CYegVoq1.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.CpEzqKmn.js';
|
|
@@ -7,7 +7,6 @@ import 'jose';
|
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-call';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
|
-
import 'bun:sqlite';
|
|
11
10
|
|
|
12
11
|
interface PrismaConfig {
|
|
13
12
|
/**
|
package/dist/adapters/test.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.BZj5bcIv.cjs';
|
|
2
2
|
import '../shared/better-auth.CYegVoq1.cjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../shared/better-auth.7QibuQ0I.cjs';
|
|
@@ -6,7 +6,6 @@ import 'jose';
|
|
|
6
6
|
import 'kysely';
|
|
7
7
|
import 'better-call';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
|
-
import 'bun:sqlite';
|
|
10
9
|
|
|
11
10
|
interface AdapterTestOptions {
|
|
12
11
|
getAdapter: (customOptions?: Omit<BetterAuthOptions, "database">) => Promise<Adapter>;
|
package/dist/adapters/test.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.CDeExxQS.mjs';
|
|
2
2
|
import '../shared/better-auth.CYegVoq1.mjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../shared/better-auth.C39-x5Oo.mjs';
|
|
@@ -6,7 +6,6 @@ import 'jose';
|
|
|
6
6
|
import 'kysely';
|
|
7
7
|
import 'better-call';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
|
-
import 'bun:sqlite';
|
|
10
9
|
|
|
11
10
|
interface AdapterTestOptions {
|
|
12
11
|
getAdapter: (customOptions?: Omit<BetterAuthOptions, "database">) => Promise<Adapter>;
|
package/dist/adapters/test.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.
|
|
1
|
+
import { f as BetterAuthOptions, g as Adapter } from '../shared/better-auth.dkazx1HL.js';
|
|
2
2
|
import '../shared/better-auth.CYegVoq1.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../shared/better-auth.CpEzqKmn.js';
|
|
@@ -6,7 +6,6 @@ import 'jose';
|
|
|
6
6
|
import 'kysely';
|
|
7
7
|
import 'better-call';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
|
-
import 'bun:sqlite';
|
|
10
9
|
|
|
11
10
|
interface AdapterTestOptions {
|
|
12
11
|
getAdapter: (customOptions?: Omit<BetterAuthOptions, "database">) => Promise<Adapter>;
|
package/dist/api/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const betterCall = require('better-call');
|
|
4
|
-
const
|
|
4
|
+
const account = require('../shared/better-auth.r0iyl8Tx.cjs');
|
|
5
5
|
const zod = require('zod');
|
|
6
6
|
const cookies_index = require('../cookies/index.cjs');
|
|
7
7
|
const schema = require('../shared/better-auth.DcWKCjjf.cjs');
|
|
@@ -39,7 +39,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
39
39
|
|
|
40
40
|
const defu__default = /*#__PURE__*/_interopDefaultCompat(defu);
|
|
41
41
|
|
|
42
|
-
const signUpEmail = () =>
|
|
42
|
+
const signUpEmail = () => account.createAuthEndpoint(
|
|
43
43
|
"/sign-up/email",
|
|
44
44
|
{
|
|
45
45
|
method: "POST",
|
|
@@ -159,28 +159,28 @@ const signUpEmail = () => refreshToken.createAuthEndpoint(
|
|
|
159
159
|
const isValidEmail = zod.z.string().email().safeParse(email);
|
|
160
160
|
if (!isValidEmail.success) {
|
|
161
161
|
throw new betterCall.APIError("BAD_REQUEST", {
|
|
162
|
-
message:
|
|
162
|
+
message: account.BASE_ERROR_CODES.INVALID_EMAIL
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
const minPasswordLength = ctx.context.password.config.minPasswordLength;
|
|
166
166
|
if (password.length < minPasswordLength) {
|
|
167
167
|
ctx.context.logger.error("Password is too short");
|
|
168
168
|
throw new betterCall.APIError("BAD_REQUEST", {
|
|
169
|
-
message:
|
|
169
|
+
message: account.BASE_ERROR_CODES.PASSWORD_TOO_SHORT
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
const maxPasswordLength = ctx.context.password.config.maxPasswordLength;
|
|
173
173
|
if (password.length > maxPasswordLength) {
|
|
174
174
|
ctx.context.logger.error("Password is too long");
|
|
175
175
|
throw new betterCall.APIError("BAD_REQUEST", {
|
|
176
|
-
message:
|
|
176
|
+
message: account.BASE_ERROR_CODES.PASSWORD_TOO_LONG
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
const dbUser = await ctx.context.internalAdapter.findUserByEmail(email);
|
|
180
180
|
if (dbUser?.user) {
|
|
181
181
|
ctx.context.logger.info(`Sign-up attempt for existing email: ${email}`);
|
|
182
182
|
throw new betterCall.APIError("UNPROCESSABLE_ENTITY", {
|
|
183
|
-
message:
|
|
183
|
+
message: account.BASE_ERROR_CODES.USER_ALREADY_EXISTS
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
const additionalData = schema.parseUserInput(
|
|
@@ -202,7 +202,7 @@ const signUpEmail = () => refreshToken.createAuthEndpoint(
|
|
|
202
202
|
);
|
|
203
203
|
if (!createdUser) {
|
|
204
204
|
throw new betterCall.APIError("BAD_REQUEST", {
|
|
205
|
-
message:
|
|
205
|
+
message: account.BASE_ERROR_CODES.FAILED_TO_CREATE_USER
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
} catch (e) {
|
|
@@ -213,13 +213,13 @@ const signUpEmail = () => refreshToken.createAuthEndpoint(
|
|
|
213
213
|
throw e;
|
|
214
214
|
}
|
|
215
215
|
throw new betterCall.APIError("UNPROCESSABLE_ENTITY", {
|
|
216
|
-
message:
|
|
216
|
+
message: account.BASE_ERROR_CODES.FAILED_TO_CREATE_USER,
|
|
217
217
|
details: e
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
220
|
if (!createdUser) {
|
|
221
221
|
throw new betterCall.APIError("UNPROCESSABLE_ENTITY", {
|
|
222
|
-
message:
|
|
222
|
+
message: account.BASE_ERROR_CODES.FAILED_TO_CREATE_USER
|
|
223
223
|
});
|
|
224
224
|
}
|
|
225
225
|
await ctx.context.internalAdapter.linkAccount(
|
|
@@ -232,7 +232,7 @@ const signUpEmail = () => refreshToken.createAuthEndpoint(
|
|
|
232
232
|
ctx
|
|
233
233
|
);
|
|
234
234
|
if (ctx.context.options.emailVerification?.sendOnSignUp || ctx.context.options.emailAndPassword.requireEmailVerification) {
|
|
235
|
-
const token = await
|
|
235
|
+
const token = await account.createEmailVerificationToken(
|
|
236
236
|
ctx.context.secret,
|
|
237
237
|
createdUser.email,
|
|
238
238
|
void 0,
|
|
@@ -264,11 +264,11 @@ const signUpEmail = () => refreshToken.createAuthEndpoint(
|
|
|
264
264
|
}
|
|
265
265
|
const session = await ctx.context.internalAdapter.createSession(
|
|
266
266
|
createdUser.id,
|
|
267
|
-
ctx
|
|
267
|
+
ctx
|
|
268
268
|
);
|
|
269
269
|
if (!session) {
|
|
270
270
|
throw new betterCall.APIError("BAD_REQUEST", {
|
|
271
|
-
message:
|
|
271
|
+
message: account.BASE_ERROR_CODES.FAILED_TO_CREATE_SESSION
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
await cookies_index.setSessionCookie(ctx, {
|
|
@@ -422,7 +422,7 @@ async function onRequestRateLimit(req, ctx) {
|
|
|
422
422
|
if (ctx.rateLimit.customRules) {
|
|
423
423
|
const _path = Object.keys(ctx.rateLimit.customRules).find((p) => {
|
|
424
424
|
if (p.includes("*")) {
|
|
425
|
-
const isMatch =
|
|
425
|
+
const isMatch = account.wildcardMatch(p)(path);
|
|
426
426
|
return isMatch;
|
|
427
427
|
}
|
|
428
428
|
return p === path;
|
|
@@ -677,37 +677,38 @@ function getEndpoints(ctx, options) {
|
|
|
677
677
|
})
|
|
678
678
|
).filter((plugin) => plugin !== void 0).flat() || [];
|
|
679
679
|
const baseEndpoints = {
|
|
680
|
-
signInSocial:
|
|
681
|
-
callbackOAuth:
|
|
682
|
-
getSession:
|
|
683
|
-
signOut:
|
|
680
|
+
signInSocial: account.signInSocial,
|
|
681
|
+
callbackOAuth: account.callbackOAuth,
|
|
682
|
+
getSession: account.getSession(),
|
|
683
|
+
signOut: account.signOut,
|
|
684
684
|
signUpEmail: signUpEmail(),
|
|
685
|
-
signInEmail:
|
|
686
|
-
forgetPassword:
|
|
687
|
-
resetPassword:
|
|
688
|
-
verifyEmail:
|
|
689
|
-
sendVerificationEmail:
|
|
690
|
-
changeEmail:
|
|
691
|
-
changePassword:
|
|
692
|
-
setPassword:
|
|
693
|
-
updateUser:
|
|
694
|
-
deleteUser:
|
|
695
|
-
forgetPasswordCallback:
|
|
696
|
-
listSessions:
|
|
697
|
-
revokeSession:
|
|
698
|
-
revokeSessions:
|
|
699
|
-
revokeOtherSessions:
|
|
700
|
-
linkSocialAccount:
|
|
701
|
-
listUserAccounts:
|
|
702
|
-
deleteUserCallback:
|
|
703
|
-
unlinkAccount:
|
|
704
|
-
refreshToken:
|
|
685
|
+
signInEmail: account.signInEmail,
|
|
686
|
+
forgetPassword: account.forgetPassword,
|
|
687
|
+
resetPassword: account.resetPassword,
|
|
688
|
+
verifyEmail: account.verifyEmail,
|
|
689
|
+
sendVerificationEmail: account.sendVerificationEmail,
|
|
690
|
+
changeEmail: account.changeEmail,
|
|
691
|
+
changePassword: account.changePassword,
|
|
692
|
+
setPassword: account.setPassword,
|
|
693
|
+
updateUser: account.updateUser(),
|
|
694
|
+
deleteUser: account.deleteUser,
|
|
695
|
+
forgetPasswordCallback: account.forgetPasswordCallback,
|
|
696
|
+
listSessions: account.listSessions(),
|
|
697
|
+
revokeSession: account.revokeSession,
|
|
698
|
+
revokeSessions: account.revokeSessions,
|
|
699
|
+
revokeOtherSessions: account.revokeOtherSessions,
|
|
700
|
+
linkSocialAccount: account.linkSocialAccount,
|
|
701
|
+
listUserAccounts: account.listUserAccounts,
|
|
702
|
+
deleteUserCallback: account.deleteUserCallback,
|
|
703
|
+
unlinkAccount: account.unlinkAccount,
|
|
704
|
+
refreshToken: account.refreshToken,
|
|
705
|
+
getAccessToken: account.getAccessToken
|
|
705
706
|
};
|
|
706
707
|
const endpoints = {
|
|
707
708
|
...baseEndpoints,
|
|
708
709
|
...pluginEndpoints,
|
|
709
|
-
ok:
|
|
710
|
-
error:
|
|
710
|
+
ok: account.ok,
|
|
711
|
+
error: account.error
|
|
711
712
|
};
|
|
712
713
|
const api = toAuthEndpoints(endpoints, ctx);
|
|
713
714
|
return {
|
|
@@ -727,7 +728,7 @@ const router = (ctx, options) => {
|
|
|
727
728
|
routerMiddleware: [
|
|
728
729
|
{
|
|
729
730
|
path: "/**",
|
|
730
|
-
middleware:
|
|
731
|
+
middleware: account.originCheckMiddleware
|
|
731
732
|
},
|
|
732
733
|
...middlewares
|
|
733
734
|
],
|
|
@@ -795,43 +796,44 @@ const router = (ctx, options) => {
|
|
|
795
796
|
};
|
|
796
797
|
|
|
797
798
|
exports.APIError = betterCall.APIError;
|
|
798
|
-
exports.callbackOAuth =
|
|
799
|
-
exports.changeEmail =
|
|
800
|
-
exports.changePassword =
|
|
801
|
-
exports.createAuthEndpoint =
|
|
802
|
-
exports.createAuthMiddleware =
|
|
803
|
-
exports.createEmailVerificationToken =
|
|
804
|
-
exports.deleteUser =
|
|
805
|
-
exports.deleteUserCallback =
|
|
806
|
-
exports.error =
|
|
807
|
-
exports.forgetPassword =
|
|
808
|
-
exports.forgetPasswordCallback =
|
|
809
|
-
exports.freshSessionMiddleware =
|
|
810
|
-
exports.
|
|
811
|
-
exports.
|
|
812
|
-
exports.
|
|
813
|
-
exports.
|
|
814
|
-
exports.
|
|
815
|
-
exports.
|
|
816
|
-
exports.
|
|
817
|
-
exports.
|
|
818
|
-
exports.
|
|
819
|
-
exports.
|
|
820
|
-
exports.
|
|
821
|
-
exports.
|
|
822
|
-
exports.
|
|
823
|
-
exports.
|
|
824
|
-
exports.
|
|
825
|
-
exports.
|
|
826
|
-
exports.
|
|
827
|
-
exports.
|
|
828
|
-
exports.
|
|
829
|
-
exports.
|
|
830
|
-
exports.
|
|
831
|
-
exports.
|
|
832
|
-
exports.
|
|
833
|
-
exports.
|
|
834
|
-
exports.
|
|
799
|
+
exports.callbackOAuth = account.callbackOAuth;
|
|
800
|
+
exports.changeEmail = account.changeEmail;
|
|
801
|
+
exports.changePassword = account.changePassword;
|
|
802
|
+
exports.createAuthEndpoint = account.createAuthEndpoint;
|
|
803
|
+
exports.createAuthMiddleware = account.createAuthMiddleware;
|
|
804
|
+
exports.createEmailVerificationToken = account.createEmailVerificationToken;
|
|
805
|
+
exports.deleteUser = account.deleteUser;
|
|
806
|
+
exports.deleteUserCallback = account.deleteUserCallback;
|
|
807
|
+
exports.error = account.error;
|
|
808
|
+
exports.forgetPassword = account.forgetPassword;
|
|
809
|
+
exports.forgetPasswordCallback = account.forgetPasswordCallback;
|
|
810
|
+
exports.freshSessionMiddleware = account.freshSessionMiddleware;
|
|
811
|
+
exports.getAccessToken = account.getAccessToken;
|
|
812
|
+
exports.getSession = account.getSession;
|
|
813
|
+
exports.getSessionFromCtx = account.getSessionFromCtx;
|
|
814
|
+
exports.linkSocialAccount = account.linkSocialAccount;
|
|
815
|
+
exports.listSessions = account.listSessions;
|
|
816
|
+
exports.listUserAccounts = account.listUserAccounts;
|
|
817
|
+
exports.ok = account.ok;
|
|
818
|
+
exports.optionsMiddleware = account.optionsMiddleware;
|
|
819
|
+
exports.originCheck = account.originCheck;
|
|
820
|
+
exports.originCheckMiddleware = account.originCheckMiddleware;
|
|
821
|
+
exports.refreshToken = account.refreshToken;
|
|
822
|
+
exports.requestOnlySessionMiddleware = account.requestOnlySessionMiddleware;
|
|
823
|
+
exports.resetPassword = account.resetPassword;
|
|
824
|
+
exports.revokeOtherSessions = account.revokeOtherSessions;
|
|
825
|
+
exports.revokeSession = account.revokeSession;
|
|
826
|
+
exports.revokeSessions = account.revokeSessions;
|
|
827
|
+
exports.sendVerificationEmail = account.sendVerificationEmail;
|
|
828
|
+
exports.sendVerificationEmailFn = account.sendVerificationEmailFn;
|
|
829
|
+
exports.sessionMiddleware = account.sessionMiddleware;
|
|
830
|
+
exports.setPassword = account.setPassword;
|
|
831
|
+
exports.signInEmail = account.signInEmail;
|
|
832
|
+
exports.signInSocial = account.signInSocial;
|
|
833
|
+
exports.signOut = account.signOut;
|
|
834
|
+
exports.unlinkAccount = account.unlinkAccount;
|
|
835
|
+
exports.updateUser = account.updateUser;
|
|
836
|
+
exports.verifyEmail = account.verifyEmail;
|
|
835
837
|
exports.getEndpoints = getEndpoints;
|
|
836
838
|
exports.router = router;
|
|
837
839
|
exports.signUpEmail = signUpEmail;
|