better-auth 1.2.5-beta.9 → 1.2.6-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/drizzle-adapter/index.d.cts +3 -3
- package/dist/adapters/drizzle-adapter/index.d.mts +3 -3
- package/dist/adapters/drizzle-adapter/index.d.ts +3 -3
- package/dist/adapters/kysely-adapter/index.d.cts +3 -3
- package/dist/adapters/kysely-adapter/index.d.mts +3 -3
- package/dist/adapters/kysely-adapter/index.d.ts +3 -3
- package/dist/adapters/memory-adapter/index.d.cts +3 -3
- package/dist/adapters/memory-adapter/index.d.mts +3 -3
- package/dist/adapters/memory-adapter/index.d.ts +3 -3
- package/dist/adapters/mongodb-adapter/index.d.cts +3 -3
- package/dist/adapters/mongodb-adapter/index.d.mts +3 -3
- package/dist/adapters/mongodb-adapter/index.d.ts +3 -3
- package/dist/adapters/prisma-adapter/index.d.cts +3 -3
- package/dist/adapters/prisma-adapter/index.d.mts +3 -3
- package/dist/adapters/prisma-adapter/index.d.ts +3 -3
- package/dist/adapters/test.d.cts +3 -3
- package/dist/adapters/test.d.mts +3 -3
- package/dist/adapters/test.d.ts +3 -3
- package/dist/api/index.cjs +77 -75
- package/dist/api/index.d.cts +4 -4
- package/dist/api/index.d.mts +4 -4
- package/dist/api/index.d.ts +4 -4
- package/dist/api/index.mjs +6 -5
- package/dist/client/index.d.cts +4 -4
- package/dist/client/index.d.mts +4 -4
- package/dist/client/index.d.ts +4 -4
- package/dist/client/plugins/index.d.cts +4 -4
- package/dist/client/plugins/index.d.mts +4 -4
- package/dist/client/plugins/index.d.ts +4 -4
- package/dist/client/react/index.d.cts +4 -4
- package/dist/client/react/index.d.mts +4 -4
- package/dist/client/react/index.d.ts +4 -4
- package/dist/client/solid/index.d.cts +4 -4
- package/dist/client/solid/index.d.mts +4 -4
- package/dist/client/solid/index.d.ts +4 -4
- package/dist/client/svelte/index.d.cts +4 -4
- package/dist/client/svelte/index.d.mts +4 -4
- package/dist/client/svelte/index.d.ts +4 -4
- package/dist/client/vue/index.d.cts +4 -4
- package/dist/client/vue/index.d.mts +4 -4
- package/dist/client/vue/index.d.ts +4 -4
- package/dist/cookies/index.d.cts +3 -3
- package/dist/cookies/index.d.mts +3 -3
- package/dist/cookies/index.d.ts +3 -3
- package/dist/db/index.cjs +1 -1
- package/dist/db/index.d.cts +4 -4
- package/dist/db/index.d.mts +4 -4
- package/dist/db/index.d.ts +4 -4
- package/dist/db/index.mjs +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +4 -4
- package/dist/integrations/next-js.cjs +5 -5
- package/dist/integrations/next-js.d.cts +3 -3
- package/dist/integrations/next-js.d.mts +3 -3
- package/dist/integrations/next-js.d.ts +3 -3
- package/dist/integrations/next-js.mjs +4 -4
- package/dist/integrations/node.d.cts +3 -3
- package/dist/integrations/node.d.mts +3 -3
- package/dist/integrations/node.d.ts +3 -3
- package/dist/integrations/svelte-kit.d.cts +3 -3
- package/dist/integrations/svelte-kit.d.mts +3 -3
- package/dist/integrations/svelte-kit.d.ts +3 -3
- package/dist/oauth2/index.cjs +7 -6
- package/dist/oauth2/index.d.cts +14 -5
- package/dist/oauth2/index.d.mts +14 -5
- package/dist/oauth2/index.d.ts +14 -5
- package/dist/oauth2/index.mjs +1 -1
- package/dist/plugins/admin/index.cjs +3 -3
- package/dist/plugins/admin/index.d.cts +3 -3
- package/dist/plugins/admin/index.d.mts +3 -3
- package/dist/plugins/admin/index.d.ts +3 -3
- package/dist/plugins/admin/index.mjs +3 -3
- package/dist/plugins/anonymous/index.cjs +5 -5
- package/dist/plugins/anonymous/index.d.cts +3 -3
- package/dist/plugins/anonymous/index.d.mts +3 -3
- package/dist/plugins/anonymous/index.d.ts +3 -3
- package/dist/plugins/anonymous/index.mjs +2 -2
- package/dist/plugins/bearer/index.cjs +4 -4
- package/dist/plugins/bearer/index.d.cts +3 -3
- package/dist/plugins/bearer/index.d.mts +3 -3
- package/dist/plugins/bearer/index.d.ts +3 -3
- package/dist/plugins/bearer/index.mjs +2 -2
- package/dist/plugins/custom-session/index.cjs +4 -4
- package/dist/plugins/custom-session/index.d.cts +3 -3
- package/dist/plugins/custom-session/index.d.mts +3 -3
- package/dist/plugins/custom-session/index.d.ts +3 -3
- package/dist/plugins/custom-session/index.mjs +2 -2
- package/dist/plugins/email-otp/index.cjs +10 -10
- package/dist/plugins/email-otp/index.d.cts +3 -3
- package/dist/plugins/email-otp/index.d.mts +3 -3
- package/dist/plugins/email-otp/index.d.ts +3 -3
- package/dist/plugins/email-otp/index.mjs +2 -2
- package/dist/plugins/generic-oauth/index.cjs +43 -19
- package/dist/plugins/generic-oauth/index.d.cts +4 -4
- package/dist/plugins/generic-oauth/index.d.mts +4 -4
- package/dist/plugins/generic-oauth/index.d.ts +4 -4
- package/dist/plugins/generic-oauth/index.mjs +29 -5
- package/dist/plugins/index.cjs +22 -22
- package/dist/plugins/index.d.cts +4 -4
- package/dist/plugins/index.d.mts +4 -4
- package/dist/plugins/index.d.ts +4 -4
- package/dist/plugins/index.mjs +6 -6
- package/dist/plugins/jwt/index.cjs +6 -6
- package/dist/plugins/jwt/index.d.cts +3 -3
- package/dist/plugins/jwt/index.d.mts +3 -3
- package/dist/plugins/jwt/index.d.ts +3 -3
- package/dist/plugins/jwt/index.mjs +2 -2
- 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 +9 -9
- package/dist/plugins/multi-session/index.d.cts +3 -3
- package/dist/plugins/multi-session/index.d.mts +3 -3
- package/dist/plugins/multi-session/index.d.ts +3 -3
- package/dist/plugins/multi-session/index.mjs +2 -2
- package/dist/plugins/oauth-proxy/index.cjs +6 -6
- package/dist/plugins/oauth-proxy/index.d.cts +3 -3
- package/dist/plugins/oauth-proxy/index.d.mts +3 -3
- package/dist/plugins/oauth-proxy/index.d.ts +3 -3
- package/dist/plugins/oauth-proxy/index.mjs +2 -2
- package/dist/plugins/oidc-provider/index.cjs +14 -14
- package/dist/plugins/oidc-provider/index.d.cts +3 -3
- package/dist/plugins/oidc-provider/index.d.mts +3 -3
- package/dist/plugins/oidc-provider/index.d.ts +3 -3
- package/dist/plugins/oidc-provider/index.mjs +2 -2
- package/dist/plugins/one-tap/index.cjs +3 -3
- package/dist/plugins/one-tap/index.mjs +2 -2
- package/dist/plugins/open-api/index.cjs +4 -4
- package/dist/plugins/open-api/index.d.cts +3 -3
- package/dist/plugins/open-api/index.d.mts +3 -3
- package/dist/plugins/open-api/index.d.ts +3 -3
- package/dist/plugins/open-api/index.mjs +2 -2
- package/dist/plugins/organization/index.cjs +3 -3
- package/dist/plugins/organization/index.d.cts +3 -3
- package/dist/plugins/organization/index.d.mts +3 -3
- package/dist/plugins/organization/index.d.ts +3 -3
- package/dist/plugins/organization/index.mjs +3 -3
- package/dist/plugins/passkey/index.cjs +15 -15
- package/dist/plugins/passkey/index.d.cts +3 -3
- package/dist/plugins/passkey/index.d.mts +3 -3
- package/dist/plugins/passkey/index.d.ts +3 -3
- package/dist/plugins/passkey/index.mjs +2 -2
- package/dist/plugins/phone-number/index.cjs +13 -13
- package/dist/plugins/phone-number/index.d.cts +3 -3
- package/dist/plugins/phone-number/index.d.mts +3 -3
- package/dist/plugins/phone-number/index.d.ts +3 -3
- package/dist/plugins/phone-number/index.mjs +2 -2
- package/dist/plugins/sso/index.cjs +11 -11
- package/dist/plugins/sso/index.d.cts +2 -2
- package/dist/plugins/sso/index.d.mts +2 -2
- package/dist/plugins/sso/index.d.ts +2 -2
- package/dist/plugins/sso/index.mjs +3 -3
- package/dist/plugins/two-factor/index.cjs +20 -20
- package/dist/plugins/two-factor/index.d.cts +3 -3
- package/dist/plugins/two-factor/index.d.mts +3 -3
- package/dist/plugins/two-factor/index.d.ts +3 -3
- package/dist/plugins/two-factor/index.mjs +3 -3
- package/dist/plugins/username/index.cjs +9 -9
- package/dist/plugins/username/index.d.cts +3 -3
- package/dist/plugins/username/index.d.mts +3 -3
- package/dist/plugins/username/index.d.ts +3 -3
- package/dist/plugins/username/index.mjs +2 -2
- package/dist/shared/{better-auth.oyDBIJLs.mjs → better-auth.2rfXmCNS.mjs} +1 -1
- package/dist/shared/{better-auth.KTt7CS7L.mjs → better-auth.9knM1kR4.mjs} +1 -1
- package/dist/shared/{better-auth.DiMBK1Ep.mjs → better-auth.B2THyVQH.mjs} +54 -1
- package/dist/shared/{better-auth.C8tekzhG.cjs → better-auth.B7irTavj.cjs} +35 -35
- package/dist/shared/{better-auth.Dd96RDNl.d.ts → better-auth.BAfIsot3.d.ts} +41 -2
- package/dist/shared/{better-auth.Dunt9jpN.d.cts → better-auth.BBG0jAhH.d.mts} +2 -2
- package/dist/shared/{better-auth.CxMUffeh.d.cts → better-auth.BDAwKjlL.d.cts} +567 -46
- package/dist/shared/{better-auth.CbBX7Xla.mjs → better-auth.BK4Kh5QZ.mjs} +19 -17
- package/dist/shared/{better-auth.DgXCgiHI.cjs → better-auth.BLV8UOn8.cjs} +54 -0
- package/dist/shared/{better-auth.BjoUuJNr.d.mts → better-auth.BTnAiI8e.d.mts} +41 -2
- package/dist/shared/{better-auth.CzK7QJBv.d.cts → better-auth.CH6fRG6d.d.cts} +41 -2
- package/dist/shared/{better-auth.dzwyqpra.d.mts → better-auth.CTQDLJN7.d.mts} +567 -46
- package/dist/shared/{better-auth.CEuqoYDM.d.mts → better-auth.CtSY9Kmu.d.cts} +2 -2
- package/dist/shared/{better-auth.Cz2saE_0.d.cts → better-auth.DAnkIG1r.d.cts} +1 -1
- package/dist/shared/{better-auth.4ZqMps6Z.d.ts → better-auth.DCxEy-As.d.ts} +1 -1
- package/dist/shared/{better-auth.D7hUw1_Y.d.ts → better-auth.DIOWNBS2.d.ts} +1 -1
- package/dist/shared/{better-auth.ybwxmbrM.mjs → better-auth.DQ-pFMwp.mjs} +118 -5
- package/dist/shared/{better-auth.BxC2ipUB.d.mts → better-auth.DZPJQ81N.d.mts} +1 -1
- package/dist/shared/{better-auth.CL_N_Cfq.cjs → better-auth.DqGx7Ip8.cjs} +20 -20
- package/dist/shared/{better-auth.wspQErD2.cjs → better-auth.TNTVT6jt.cjs} +3 -3
- package/dist/shared/{better-auth.4J4_zAGP.cjs → better-auth.b0MLzqQX.cjs} +118 -4
- package/dist/shared/{better-auth.CdPDif0r.mjs → better-auth.cN4sTcuQ.mjs} +1 -1
- package/dist/shared/{better-auth.X0ynzeu1.cjs → better-auth.q7ChvjiM.cjs} +19 -17
- package/dist/shared/{better-auth.CixnJ90x.d.ts → better-auth.tpz8D0AA.d.ts} +567 -46
- package/dist/social-providers/index.cjs +197 -32
- package/dist/social-providers/index.d.cts +1 -1
- package/dist/social-providers/index.d.mts +1 -1
- package/dist/social-providers/index.d.ts +1 -1
- package/dist/social-providers/index.mjs +166 -1
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
|
-
import { c as createAuthMiddleware, a as createAuthEndpoint, s as sessionMiddleware } from '../../shared/better-auth.
|
|
3
|
+
import { c as createAuthMiddleware, a as createAuthEndpoint, s as sessionMiddleware } from '../../shared/better-auth.DQ-pFMwp.mjs';
|
|
4
4
|
import { parseSetCookieHeader, parseCookies, setSessionCookie, deleteSessionCookie } from '../../cookies/index.mjs';
|
|
5
5
|
import '../../shared/better-auth.CepcSj5H.mjs';
|
|
6
6
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
@@ -9,7 +9,7 @@ import 'defu';
|
|
|
9
9
|
import '../../social-providers/index.mjs';
|
|
10
10
|
import '@better-fetch/fetch';
|
|
11
11
|
import 'jose';
|
|
12
|
-
import '../../shared/better-auth.
|
|
12
|
+
import '../../shared/better-auth.B2THyVQH.mjs';
|
|
13
13
|
import '../../shared/better-auth.CW6D9eSx.mjs';
|
|
14
14
|
import '@better-auth/utils/hash';
|
|
15
15
|
import '@better-auth/utils/base64';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
4
|
require('better-call');
|
|
5
|
-
const
|
|
5
|
+
const refreshToken = require('../../shared/better-auth.b0MLzqQX.cjs');
|
|
6
6
|
const env = require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
7
7
|
require('@better-auth/utils/base64');
|
|
8
8
|
require('@better-auth/utils/hmac');
|
|
@@ -18,7 +18,7 @@ require('../../shared/better-auth.D3mtHEZg.cjs');
|
|
|
18
18
|
require('../../social-providers/index.cjs');
|
|
19
19
|
require('@better-fetch/fetch');
|
|
20
20
|
require('jose');
|
|
21
|
-
require('../../shared/better-auth.
|
|
21
|
+
require('../../shared/better-auth.BLV8UOn8.cjs');
|
|
22
22
|
require('@better-auth/utils/hash');
|
|
23
23
|
require('@noble/ciphers/chacha');
|
|
24
24
|
require('@noble/ciphers/utils');
|
|
@@ -49,7 +49,7 @@ const oAuthProxy = (opts) => {
|
|
|
49
49
|
return {
|
|
50
50
|
id: "oauth-proxy",
|
|
51
51
|
endpoints: {
|
|
52
|
-
oAuthProxy:
|
|
52
|
+
oAuthProxy: refreshToken.createAuthEndpoint(
|
|
53
53
|
"/oauth-proxy-callback",
|
|
54
54
|
{
|
|
55
55
|
method: "GET",
|
|
@@ -61,7 +61,7 @@ const oAuthProxy = (opts) => {
|
|
|
61
61
|
description: "The cookies to set after the proxy"
|
|
62
62
|
})
|
|
63
63
|
}),
|
|
64
|
-
use: [
|
|
64
|
+
use: [refreshToken.originCheck((ctx) => ctx.query.callbackURL)],
|
|
65
65
|
metadata: {
|
|
66
66
|
openapi: {
|
|
67
67
|
description: "OAuth Proxy Callback",
|
|
@@ -112,7 +112,7 @@ const oAuthProxy = (opts) => {
|
|
|
112
112
|
matcher(context) {
|
|
113
113
|
return context.path?.startsWith("/callback");
|
|
114
114
|
},
|
|
115
|
-
handler:
|
|
115
|
+
handler: refreshToken.createAuthMiddleware(async (ctx) => {
|
|
116
116
|
const headers = ctx.context.responseHeaders;
|
|
117
117
|
const location = headers?.get("location");
|
|
118
118
|
if (location?.includes("/oauth-proxy-callback?callbackURL")) {
|
|
@@ -150,7 +150,7 @@ const oAuthProxy = (opts) => {
|
|
|
150
150
|
matcher(context) {
|
|
151
151
|
return context.path?.startsWith("/sign-in/social");
|
|
152
152
|
},
|
|
153
|
-
handler:
|
|
153
|
+
handler: refreshToken.createAuthMiddleware(async (ctx) => {
|
|
154
154
|
const url = new URL(
|
|
155
155
|
opts?.currentURL || ctx.request?.url || getVenderBaseURL() || ctx.context.baseURL
|
|
156
156
|
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
|
-
import { H as HookEndpointContext, l as AuthContext } from '../../shared/better-auth.
|
|
3
|
+
import { H as HookEndpointContext, l as AuthContext } from '../../shared/better-auth.BDAwKjlL.cjs';
|
|
4
4
|
import '../../shared/better-auth.Bi8FQwDD.cjs';
|
|
5
|
-
import '
|
|
6
|
-
import '../../shared/better-auth.CzK7QJBv.cjs';
|
|
5
|
+
import '../../shared/better-auth.CH6fRG6d.cjs';
|
|
7
6
|
import 'jose';
|
|
7
|
+
import 'kysely';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
9
|
|
|
10
10
|
interface OAuthProxyOptions {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
|
-
import { H as HookEndpointContext, l as AuthContext } from '../../shared/better-auth.
|
|
3
|
+
import { H as HookEndpointContext, l as AuthContext } from '../../shared/better-auth.CTQDLJN7.mjs';
|
|
4
4
|
import '../../shared/better-auth.Bi8FQwDD.mjs';
|
|
5
|
-
import '
|
|
6
|
-
import '../../shared/better-auth.BjoUuJNr.mjs';
|
|
5
|
+
import '../../shared/better-auth.BTnAiI8e.mjs';
|
|
7
6
|
import 'jose';
|
|
7
|
+
import 'kysely';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
9
|
|
|
10
10
|
interface OAuthProxyOptions {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
|
-
import { H as HookEndpointContext, l as AuthContext } from '../../shared/better-auth.
|
|
3
|
+
import { H as HookEndpointContext, l as AuthContext } from '../../shared/better-auth.tpz8D0AA.js';
|
|
4
4
|
import '../../shared/better-auth.Bi8FQwDD.js';
|
|
5
|
-
import '
|
|
6
|
-
import '../../shared/better-auth.Dd96RDNl.js';
|
|
5
|
+
import '../../shared/better-auth.BAfIsot3.js';
|
|
7
6
|
import 'jose';
|
|
7
|
+
import 'kysely';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
9
|
|
|
10
10
|
interface OAuthProxyOptions {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import 'better-call';
|
|
3
|
-
import { c as createAuthMiddleware, a as createAuthEndpoint, o as originCheck } from '../../shared/better-auth.
|
|
3
|
+
import { c as createAuthMiddleware, a as createAuthEndpoint, o as originCheck } from '../../shared/better-auth.DQ-pFMwp.mjs';
|
|
4
4
|
import { e as env } from '../../shared/better-auth.8zoxzg-F.mjs';
|
|
5
5
|
import '@better-auth/utils/base64';
|
|
6
6
|
import '@better-auth/utils/hmac';
|
|
@@ -16,7 +16,7 @@ import '../../shared/better-auth.tB5eU6EY.mjs';
|
|
|
16
16
|
import '../../social-providers/index.mjs';
|
|
17
17
|
import '@better-fetch/fetch';
|
|
18
18
|
import 'jose';
|
|
19
|
-
import '../../shared/better-auth.
|
|
19
|
+
import '../../shared/better-auth.B2THyVQH.mjs';
|
|
20
20
|
import '@better-auth/utils/hash';
|
|
21
21
|
import '@noble/ciphers/chacha';
|
|
22
22
|
import '@noble/ciphers/utils';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const jose = require('jose');
|
|
4
4
|
const zod = require('zod');
|
|
5
5
|
const betterCall = require('better-call');
|
|
6
|
-
const
|
|
6
|
+
const refreshToken = require('../../shared/better-auth.b0MLzqQX.cjs');
|
|
7
7
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
8
8
|
const base64 = require('@better-auth/utils/base64');
|
|
9
9
|
require('@better-auth/utils/hmac');
|
|
@@ -22,7 +22,7 @@ require('@noble/hashes/utils');
|
|
|
22
22
|
const random = require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
23
23
|
require('../../social-providers/index.cjs');
|
|
24
24
|
require('@better-fetch/fetch');
|
|
25
|
-
require('../../shared/better-auth.
|
|
25
|
+
require('../../shared/better-auth.BLV8UOn8.cjs');
|
|
26
26
|
require('../../shared/better-auth.C1hdVENX.cjs');
|
|
27
27
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
28
28
|
require('@better-auth/utils/random');
|
|
@@ -161,7 +161,7 @@ async function authorize(ctx, options) {
|
|
|
161
161
|
error: "invalid_request"
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
const session = await
|
|
164
|
+
const session = await refreshToken.getSessionFromCtx(ctx);
|
|
165
165
|
if (!session) {
|
|
166
166
|
await ctx.setSignedCookie(
|
|
167
167
|
"oidc_login_prompt",
|
|
@@ -423,7 +423,7 @@ const oidcProvider = (options) => {
|
|
|
423
423
|
matcher() {
|
|
424
424
|
return true;
|
|
425
425
|
},
|
|
426
|
-
handler:
|
|
426
|
+
handler: refreshToken.createAuthMiddleware(async (ctx) => {
|
|
427
427
|
const cookie = await ctx.getSignedCookie(
|
|
428
428
|
"oidc_login_prompt",
|
|
429
429
|
ctx.context.secret
|
|
@@ -458,7 +458,7 @@ const oidcProvider = (options) => {
|
|
|
458
458
|
]
|
|
459
459
|
},
|
|
460
460
|
endpoints: {
|
|
461
|
-
getOpenIdConfig:
|
|
461
|
+
getOpenIdConfig: refreshToken.createAuthEndpoint(
|
|
462
462
|
"/.well-known/openid-configuration",
|
|
463
463
|
{
|
|
464
464
|
method: "GET",
|
|
@@ -471,7 +471,7 @@ const oidcProvider = (options) => {
|
|
|
471
471
|
return ctx.json(metadata);
|
|
472
472
|
}
|
|
473
473
|
),
|
|
474
|
-
oAuth2authorize:
|
|
474
|
+
oAuth2authorize: refreshToken.createAuthEndpoint(
|
|
475
475
|
"/oauth2/authorize",
|
|
476
476
|
{
|
|
477
477
|
method: "GET",
|
|
@@ -481,14 +481,14 @@ const oidcProvider = (options) => {
|
|
|
481
481
|
return authorize(ctx, opts);
|
|
482
482
|
}
|
|
483
483
|
),
|
|
484
|
-
oAuthConsent:
|
|
484
|
+
oAuthConsent: refreshToken.createAuthEndpoint(
|
|
485
485
|
"/oauth2/consent",
|
|
486
486
|
{
|
|
487
487
|
method: "POST",
|
|
488
488
|
body: zod.z.object({
|
|
489
489
|
accept: zod.z.boolean()
|
|
490
490
|
}),
|
|
491
|
-
use: [
|
|
491
|
+
use: [refreshToken.sessionMiddleware]
|
|
492
492
|
},
|
|
493
493
|
async (ctx) => {
|
|
494
494
|
const storedCode = await ctx.getSignedCookie(
|
|
@@ -562,7 +562,7 @@ const oidcProvider = (options) => {
|
|
|
562
562
|
});
|
|
563
563
|
}
|
|
564
564
|
),
|
|
565
|
-
oAuth2token:
|
|
565
|
+
oAuth2token: refreshToken.createAuthEndpoint(
|
|
566
566
|
"/oauth2/token",
|
|
567
567
|
{
|
|
568
568
|
method: "POST",
|
|
@@ -896,7 +896,7 @@ const oidcProvider = (options) => {
|
|
|
896
896
|
);
|
|
897
897
|
}
|
|
898
898
|
),
|
|
899
|
-
oAuth2userInfo:
|
|
899
|
+
oAuth2userInfo: refreshToken.createAuthEndpoint(
|
|
900
900
|
"/oauth2/userinfo",
|
|
901
901
|
{
|
|
902
902
|
method: "GET",
|
|
@@ -966,7 +966,7 @@ const oidcProvider = (options) => {
|
|
|
966
966
|
});
|
|
967
967
|
}
|
|
968
968
|
),
|
|
969
|
-
registerOAuthApplication:
|
|
969
|
+
registerOAuthApplication: refreshToken.createAuthEndpoint(
|
|
970
970
|
"/oauth2/register",
|
|
971
971
|
{
|
|
972
972
|
method: "POST",
|
|
@@ -1002,7 +1002,7 @@ const oidcProvider = (options) => {
|
|
|
1002
1002
|
},
|
|
1003
1003
|
async (ctx) => {
|
|
1004
1004
|
const body = ctx.body;
|
|
1005
|
-
const session = await
|
|
1005
|
+
const session = await refreshToken.getSessionFromCtx(ctx);
|
|
1006
1006
|
if (!session && !options.allowDynamicClientRegistration) {
|
|
1007
1007
|
throw new betterCall.APIError("UNAUTHORIZED", {
|
|
1008
1008
|
error: "invalid_token",
|
|
@@ -1083,11 +1083,11 @@ const oidcProvider = (options) => {
|
|
|
1083
1083
|
);
|
|
1084
1084
|
}
|
|
1085
1085
|
),
|
|
1086
|
-
getOAuthClient:
|
|
1086
|
+
getOAuthClient: refreshToken.createAuthEndpoint(
|
|
1087
1087
|
"/oauth2/client/:id",
|
|
1088
1088
|
{
|
|
1089
1089
|
method: "GET",
|
|
1090
|
-
use: [
|
|
1090
|
+
use: [refreshToken.sessionMiddleware]
|
|
1091
1091
|
},
|
|
1092
1092
|
async (ctx) => {
|
|
1093
1093
|
const client = await ctx.context.adapter.findOne(
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { U as User } from '../../shared/better-auth.
|
|
3
|
+
import { U as User } from '../../shared/better-auth.BDAwKjlL.cjs';
|
|
4
4
|
import '../../shared/better-auth.Bi8FQwDD.cjs';
|
|
5
|
-
import '
|
|
6
|
-
import '../../shared/better-auth.CzK7QJBv.cjs';
|
|
5
|
+
import '../../shared/better-auth.CH6fRG6d.cjs';
|
|
7
6
|
import 'jose';
|
|
7
|
+
import 'kysely';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
9
|
|
|
10
10
|
interface OIDCOptions {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { U as User } from '../../shared/better-auth.
|
|
3
|
+
import { U as User } from '../../shared/better-auth.CTQDLJN7.mjs';
|
|
4
4
|
import '../../shared/better-auth.Bi8FQwDD.mjs';
|
|
5
|
-
import '
|
|
6
|
-
import '../../shared/better-auth.BjoUuJNr.mjs';
|
|
5
|
+
import '../../shared/better-auth.BTnAiI8e.mjs';
|
|
7
6
|
import 'jose';
|
|
7
|
+
import 'kysely';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
9
|
|
|
10
10
|
interface OIDCOptions {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { U as User } from '../../shared/better-auth.
|
|
3
|
+
import { U as User } from '../../shared/better-auth.tpz8D0AA.js';
|
|
4
4
|
import '../../shared/better-auth.Bi8FQwDD.js';
|
|
5
|
-
import '
|
|
6
|
-
import '../../shared/better-auth.Dd96RDNl.js';
|
|
5
|
+
import '../../shared/better-auth.BAfIsot3.js';
|
|
7
6
|
import 'jose';
|
|
7
|
+
import 'kysely';
|
|
8
8
|
import 'better-sqlite3';
|
|
9
9
|
|
|
10
10
|
interface OIDCOptions {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SignJWT } from 'jose';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { APIError } from 'better-call';
|
|
4
|
-
import { g as getSessionFromCtx, a as createAuthEndpoint, c as createAuthMiddleware, s as sessionMiddleware } from '../../shared/better-auth.
|
|
4
|
+
import { g as getSessionFromCtx, a as createAuthEndpoint, c as createAuthMiddleware, s as sessionMiddleware } from '../../shared/better-auth.DQ-pFMwp.mjs';
|
|
5
5
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
6
6
|
import { base64 } from '@better-auth/utils/base64';
|
|
7
7
|
import '@better-auth/utils/hmac';
|
|
@@ -20,7 +20,7 @@ import '@noble/hashes/utils';
|
|
|
20
20
|
import { g as generateRandomString } from '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
21
21
|
import '../../social-providers/index.mjs';
|
|
22
22
|
import '@better-fetch/fetch';
|
|
23
|
-
import '../../shared/better-auth.
|
|
23
|
+
import '../../shared/better-auth.B2THyVQH.mjs';
|
|
24
24
|
import '../../shared/better-auth.CW6D9eSx.mjs';
|
|
25
25
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
26
26
|
import '@better-auth/utils/random';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
|
-
const
|
|
5
|
+
const refreshToken = require('../../shared/better-auth.b0MLzqQX.cjs');
|
|
6
6
|
const cookies_index = require('../../cookies/index.cjs');
|
|
7
7
|
require('../../shared/better-auth.C5H9XEzZ.cjs');
|
|
8
8
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
@@ -11,7 +11,7 @@ require('defu');
|
|
|
11
11
|
const jose = require('jose');
|
|
12
12
|
require('../../social-providers/index.cjs');
|
|
13
13
|
require('@better-fetch/fetch');
|
|
14
|
-
require('../../shared/better-auth.
|
|
14
|
+
require('../../shared/better-auth.BLV8UOn8.cjs');
|
|
15
15
|
require('../../shared/better-auth.C1hdVENX.cjs');
|
|
16
16
|
require('@better-auth/utils/hash');
|
|
17
17
|
require('@better-auth/utils/base64');
|
|
@@ -41,7 +41,7 @@ function toBoolean(value) {
|
|
|
41
41
|
const oneTap = (options) => ({
|
|
42
42
|
id: "one-tap",
|
|
43
43
|
endpoints: {
|
|
44
|
-
oneTapCallback:
|
|
44
|
+
oneTapCallback: refreshToken.createAuthEndpoint(
|
|
45
45
|
"/one-tap/callback",
|
|
46
46
|
{
|
|
47
47
|
method: "POST",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
|
-
import { a as createAuthEndpoint } from '../../shared/better-auth.
|
|
3
|
+
import { a as createAuthEndpoint } from '../../shared/better-auth.DQ-pFMwp.mjs';
|
|
4
4
|
import { setSessionCookie } from '../../cookies/index.mjs';
|
|
5
5
|
import '../../shared/better-auth.CepcSj5H.mjs';
|
|
6
6
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
@@ -9,7 +9,7 @@ import 'defu';
|
|
|
9
9
|
import { createRemoteJWKSet, jwtVerify } from 'jose';
|
|
10
10
|
import '../../social-providers/index.mjs';
|
|
11
11
|
import '@better-fetch/fetch';
|
|
12
|
-
import '../../shared/better-auth.
|
|
12
|
+
import '../../shared/better-auth.B2THyVQH.mjs';
|
|
13
13
|
import '../../shared/better-auth.CW6D9eSx.mjs';
|
|
14
14
|
import '@better-auth/utils/hash';
|
|
15
15
|
import '@better-auth/utils/base64';
|
|
@@ -20,7 +20,7 @@ require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
|
20
20
|
require('../../shared/better-auth.GpOOav9x.cjs');
|
|
21
21
|
const getTables = require('../../shared/better-auth.BEphVDyL.cjs');
|
|
22
22
|
require('kysely');
|
|
23
|
-
const
|
|
23
|
+
const refreshToken = require('../../shared/better-auth.b0MLzqQX.cjs');
|
|
24
24
|
require('@better-auth/utils/hmac');
|
|
25
25
|
require('defu');
|
|
26
26
|
require('../../cookies/index.cjs');
|
|
@@ -31,7 +31,7 @@ require('../../shared/better-auth.C-R0J0n1.cjs');
|
|
|
31
31
|
require('../../shared/better-auth.i9-25Ul9.cjs');
|
|
32
32
|
require('../../social-providers/index.cjs');
|
|
33
33
|
require('@better-fetch/fetch');
|
|
34
|
-
require('../../shared/better-auth.
|
|
34
|
+
require('../../shared/better-auth.BLV8UOn8.cjs');
|
|
35
35
|
require('../../shared/better-auth.QbbyHMYf.cjs');
|
|
36
36
|
require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
37
37
|
require('../../shared/better-auth.BMYo0QR-.cjs');
|
|
@@ -443,7 +443,7 @@ const openAPI = (options) => {
|
|
|
443
443
|
return {
|
|
444
444
|
id: "open-api",
|
|
445
445
|
endpoints: {
|
|
446
|
-
generateOpenAPISchema:
|
|
446
|
+
generateOpenAPISchema: refreshToken.createAuthEndpoint(
|
|
447
447
|
"/open-api/generate-schema",
|
|
448
448
|
{
|
|
449
449
|
method: "GET"
|
|
@@ -453,7 +453,7 @@ const openAPI = (options) => {
|
|
|
453
453
|
return ctx.json(schema);
|
|
454
454
|
}
|
|
455
455
|
),
|
|
456
|
-
openAPIReference:
|
|
456
|
+
openAPIReference: refreshToken.createAuthEndpoint(
|
|
457
457
|
path,
|
|
458
458
|
{
|
|
459
459
|
method: "GET",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { OpenAPIParameter, OpenAPISchemaType } from 'better-call';
|
|
3
|
-
import { l as AuthContext, f as BetterAuthOptions } from '../../shared/better-auth.
|
|
3
|
+
import { l as AuthContext, f as BetterAuthOptions } from '../../shared/better-auth.BDAwKjlL.cjs';
|
|
4
4
|
import { L as LiteralString } from '../../shared/better-auth.Bi8FQwDD.cjs';
|
|
5
5
|
import 'zod';
|
|
6
|
-
import '
|
|
7
|
-
import '../../shared/better-auth.CzK7QJBv.cjs';
|
|
6
|
+
import '../../shared/better-auth.CH6fRG6d.cjs';
|
|
8
7
|
import 'jose';
|
|
8
|
+
import 'kysely';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
10
|
|
|
11
11
|
interface Path {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { OpenAPIParameter, OpenAPISchemaType } from 'better-call';
|
|
3
|
-
import { l as AuthContext, f as BetterAuthOptions } from '../../shared/better-auth.
|
|
3
|
+
import { l as AuthContext, f as BetterAuthOptions } from '../../shared/better-auth.CTQDLJN7.mjs';
|
|
4
4
|
import { L as LiteralString } from '../../shared/better-auth.Bi8FQwDD.mjs';
|
|
5
5
|
import 'zod';
|
|
6
|
-
import '
|
|
7
|
-
import '../../shared/better-auth.BjoUuJNr.mjs';
|
|
6
|
+
import '../../shared/better-auth.BTnAiI8e.mjs';
|
|
8
7
|
import 'jose';
|
|
8
|
+
import 'kysely';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
10
|
|
|
11
11
|
interface Path {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { OpenAPIParameter, OpenAPISchemaType } from 'better-call';
|
|
3
|
-
import { l as AuthContext, f as BetterAuthOptions } from '../../shared/better-auth.
|
|
3
|
+
import { l as AuthContext, f as BetterAuthOptions } from '../../shared/better-auth.tpz8D0AA.js';
|
|
4
4
|
import { L as LiteralString } from '../../shared/better-auth.Bi8FQwDD.js';
|
|
5
5
|
import 'zod';
|
|
6
|
-
import '
|
|
7
|
-
import '../../shared/better-auth.Dd96RDNl.js';
|
|
6
|
+
import '../../shared/better-auth.BAfIsot3.js';
|
|
8
7
|
import 'jose';
|
|
8
|
+
import 'kysely';
|
|
9
9
|
import 'better-sqlite3';
|
|
10
10
|
|
|
11
11
|
interface Path {
|
|
@@ -18,7 +18,7 @@ import '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
|
18
18
|
import '../../shared/better-auth.DH3YjMQH.mjs';
|
|
19
19
|
import { g as getAuthTables } from '../../shared/better-auth.DORkW_Ge.mjs';
|
|
20
20
|
import 'kysely';
|
|
21
|
-
import { a as createAuthEndpoint } from '../../shared/better-auth.
|
|
21
|
+
import { a as createAuthEndpoint } from '../../shared/better-auth.DQ-pFMwp.mjs';
|
|
22
22
|
import '@better-auth/utils/hmac';
|
|
23
23
|
import 'defu';
|
|
24
24
|
import '../../cookies/index.mjs';
|
|
@@ -29,7 +29,7 @@ import '../../shared/better-auth.VTXNLFMT.mjs';
|
|
|
29
29
|
import '../../shared/better-auth.DZGc_87_.mjs';
|
|
30
30
|
import '../../social-providers/index.mjs';
|
|
31
31
|
import '@better-fetch/fetch';
|
|
32
|
-
import '../../shared/better-auth.
|
|
32
|
+
import '../../shared/better-auth.B2THyVQH.mjs';
|
|
33
33
|
import '../../shared/better-auth.BdyOG_p4.mjs';
|
|
34
34
|
import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
35
35
|
import '../../shared/better-auth.DDEbWX-S.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const organization = require('../../shared/better-auth.
|
|
3
|
+
const organization = require('../../shared/better-auth.B7irTavj.cjs');
|
|
4
4
|
require('better-call');
|
|
5
5
|
require('zod');
|
|
6
|
-
require('../../shared/better-auth.
|
|
6
|
+
require('../../shared/better-auth.b0MLzqQX.cjs');
|
|
7
7
|
require('../../cookies/index.cjs');
|
|
8
8
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
9
9
|
require('../../shared/better-auth.C1hdVENX.cjs');
|
|
@@ -15,7 +15,7 @@ require('../../shared/better-auth.C-R0J0n1.cjs');
|
|
|
15
15
|
require('../../social-providers/index.cjs');
|
|
16
16
|
require('@better-fetch/fetch');
|
|
17
17
|
require('jose');
|
|
18
|
-
require('../../shared/better-auth.
|
|
18
|
+
require('../../shared/better-auth.BLV8UOn8.cjs');
|
|
19
19
|
require('@better-auth/utils/hash');
|
|
20
20
|
require('@noble/ciphers/chacha');
|
|
21
21
|
require('@noble/ciphers/utils');
|
|
@@ -2,12 +2,12 @@ import { AccessControl, Role, Statements } from '../access/index.cjs';
|
|
|
2
2
|
import { z, ZodLiteral } from 'zod';
|
|
3
3
|
import * as better_call from 'better-call';
|
|
4
4
|
import { b as Prettify } from '../../shared/better-auth.Bi8FQwDD.cjs';
|
|
5
|
-
import { U as User, S as Session, G as GenericEndpointContext } from '../../shared/better-auth.
|
|
5
|
+
import { U as User, S as Session, G as GenericEndpointContext } from '../../shared/better-auth.BDAwKjlL.cjs';
|
|
6
6
|
import { defaultRoles } from './access/index.cjs';
|
|
7
7
|
export { adminAc, defaultAc, defaultStatements, memberAc, ownerAc } from './access/index.cjs';
|
|
8
|
-
import '
|
|
9
|
-
import '../../shared/better-auth.CzK7QJBv.cjs';
|
|
8
|
+
import '../../shared/better-auth.CH6fRG6d.cjs';
|
|
10
9
|
import 'jose';
|
|
10
|
+
import 'kysely';
|
|
11
11
|
import 'better-sqlite3';
|
|
12
12
|
|
|
13
13
|
declare const role: z.ZodString;
|
|
@@ -2,12 +2,12 @@ import { AccessControl, Role, Statements } from '../access/index.mjs';
|
|
|
2
2
|
import { z, ZodLiteral } from 'zod';
|
|
3
3
|
import * as better_call from 'better-call';
|
|
4
4
|
import { b as Prettify } from '../../shared/better-auth.Bi8FQwDD.mjs';
|
|
5
|
-
import { U as User, S as Session, G as GenericEndpointContext } from '../../shared/better-auth.
|
|
5
|
+
import { U as User, S as Session, G as GenericEndpointContext } from '../../shared/better-auth.CTQDLJN7.mjs';
|
|
6
6
|
import { defaultRoles } from './access/index.mjs';
|
|
7
7
|
export { adminAc, defaultAc, defaultStatements, memberAc, ownerAc } from './access/index.mjs';
|
|
8
|
-
import '
|
|
9
|
-
import '../../shared/better-auth.BjoUuJNr.mjs';
|
|
8
|
+
import '../../shared/better-auth.BTnAiI8e.mjs';
|
|
10
9
|
import 'jose';
|
|
10
|
+
import 'kysely';
|
|
11
11
|
import 'better-sqlite3';
|
|
12
12
|
|
|
13
13
|
declare const role: z.ZodString;
|
|
@@ -2,12 +2,12 @@ import { AccessControl, Role, Statements } from '../access/index.js';
|
|
|
2
2
|
import { z, ZodLiteral } from 'zod';
|
|
3
3
|
import * as better_call from 'better-call';
|
|
4
4
|
import { b as Prettify } from '../../shared/better-auth.Bi8FQwDD.js';
|
|
5
|
-
import { U as User, S as Session, G as GenericEndpointContext } from '../../shared/better-auth.
|
|
5
|
+
import { U as User, S as Session, G as GenericEndpointContext } from '../../shared/better-auth.tpz8D0AA.js';
|
|
6
6
|
import { defaultRoles } from './access/index.js';
|
|
7
7
|
export { adminAc, defaultAc, defaultStatements, memberAc, ownerAc } from './access/index.js';
|
|
8
|
-
import '
|
|
9
|
-
import '../../shared/better-auth.Dd96RDNl.js';
|
|
8
|
+
import '../../shared/better-auth.BAfIsot3.js';
|
|
10
9
|
import 'jose';
|
|
10
|
+
import 'kysely';
|
|
11
11
|
import 'better-sqlite3';
|
|
12
12
|
|
|
13
13
|
declare const role: z.ZodString;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { o as organization, p as parseRoles } from '../../shared/better-auth.
|
|
1
|
+
export { o as organization, p as parseRoles } from '../../shared/better-auth.9knM1kR4.mjs';
|
|
2
2
|
import 'better-call';
|
|
3
3
|
import 'zod';
|
|
4
|
-
import '../../shared/better-auth.
|
|
4
|
+
import '../../shared/better-auth.DQ-pFMwp.mjs';
|
|
5
5
|
import '../../cookies/index.mjs';
|
|
6
6
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
7
7
|
import '../../shared/better-auth.CW6D9eSx.mjs';
|
|
@@ -13,7 +13,7 @@ import '../../shared/better-auth.VTXNLFMT.mjs';
|
|
|
13
13
|
import '../../social-providers/index.mjs';
|
|
14
14
|
import '@better-fetch/fetch';
|
|
15
15
|
import 'jose';
|
|
16
|
-
import '../../shared/better-auth.
|
|
16
|
+
import '../../shared/better-auth.B2THyVQH.mjs';
|
|
17
17
|
import '@better-auth/utils/hash';
|
|
18
18
|
import '@noble/ciphers/chacha';
|
|
19
19
|
import '@noble/ciphers/utils';
|