better-auth 1.4.0-beta.3 → 1.4.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/drizzle-adapter/index.d.cts +1 -1
- package/dist/adapters/drizzle-adapter/index.d.mts +1 -1
- package/dist/adapters/drizzle-adapter/index.d.ts +1 -1
- package/dist/adapters/index.d.cts +2 -2
- package/dist/adapters/index.d.mts +2 -2
- package/dist/adapters/index.d.ts +2 -2
- package/dist/adapters/kysely-adapter/index.d.cts +1 -1
- package/dist/adapters/kysely-adapter/index.d.mts +1 -1
- package/dist/adapters/kysely-adapter/index.d.ts +1 -1
- package/dist/adapters/memory-adapter/index.d.cts +1 -1
- package/dist/adapters/memory-adapter/index.d.mts +1 -1
- package/dist/adapters/memory-adapter/index.d.ts +1 -1
- package/dist/adapters/mongodb-adapter/index.d.cts +1 -1
- package/dist/adapters/mongodb-adapter/index.d.mts +1 -1
- package/dist/adapters/mongodb-adapter/index.d.ts +1 -1
- package/dist/adapters/prisma-adapter/index.d.cts +1 -1
- package/dist/adapters/prisma-adapter/index.d.mts +1 -1
- package/dist/adapters/prisma-adapter/index.d.ts +1 -1
- package/dist/adapters/test.d.cts +1 -1
- package/dist/adapters/test.d.mts +1 -1
- package/dist/adapters/test.d.ts +1 -1
- package/dist/api/index.cjs +7 -6
- package/dist/api/index.d.cts +1 -1
- package/dist/api/index.d.mts +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.mjs +9 -8
- package/dist/client/index.cjs +3 -3
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.mts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.mjs +3 -3
- package/dist/client/plugins/index.d.cts +3 -3
- package/dist/client/plugins/index.d.mts +3 -3
- package/dist/client/plugins/index.d.ts +3 -3
- package/dist/client/react/index.cjs +2 -2
- package/dist/client/react/index.d.cts +9 -9
- package/dist/client/react/index.d.mts +9 -9
- package/dist/client/react/index.d.ts +9 -9
- package/dist/client/react/index.mjs +2 -2
- package/dist/client/solid/index.cjs +2 -2
- package/dist/client/solid/index.d.cts +9 -9
- package/dist/client/solid/index.d.mts +9 -9
- package/dist/client/solid/index.d.ts +9 -9
- package/dist/client/solid/index.mjs +2 -2
- package/dist/client/svelte/index.cjs +2 -2
- package/dist/client/svelte/index.d.cts +3 -3
- package/dist/client/svelte/index.d.mts +3 -3
- package/dist/client/svelte/index.d.ts +3 -3
- package/dist/client/svelte/index.mjs +2 -2
- package/dist/client/vue/index.cjs +3 -3
- package/dist/client/vue/index.d.cts +3 -3
- package/dist/client/vue/index.d.mts +3 -3
- package/dist/client/vue/index.d.ts +3 -3
- package/dist/client/vue/index.mjs +3 -3
- package/dist/cookies/index.cjs +2 -2
- package/dist/cookies/index.d.cts +1 -1
- package/dist/cookies/index.d.mts +1 -1
- package/dist/cookies/index.d.ts +1 -1
- package/dist/cookies/index.mjs +2 -2
- package/dist/db/index.cjs +1 -1
- package/dist/db/index.d.cts +2 -2
- package/dist/db/index.d.mts +2 -2
- package/dist/db/index.d.ts +2 -2
- package/dist/db/index.mjs +1 -1
- package/dist/index.cjs +7 -6
- package/dist/index.d.cts +9 -9
- package/dist/index.d.mts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.mjs +7 -6
- package/dist/integrations/next-js.cjs +6 -5
- package/dist/integrations/next-js.d.cts +1 -1
- package/dist/integrations/next-js.d.mts +1 -1
- package/dist/integrations/next-js.d.ts +1 -1
- package/dist/integrations/next-js.mjs +6 -5
- package/dist/integrations/node.d.cts +1 -1
- package/dist/integrations/node.d.mts +1 -1
- package/dist/integrations/node.d.ts +1 -1
- package/dist/integrations/react-start.cjs +6 -5
- package/dist/integrations/react-start.d.cts +1 -1
- package/dist/integrations/react-start.d.mts +1 -1
- package/dist/integrations/react-start.d.ts +1 -1
- package/dist/integrations/react-start.mjs +6 -5
- package/dist/integrations/svelte-kit.cjs +5 -4
- package/dist/integrations/svelte-kit.d.cts +1 -1
- package/dist/integrations/svelte-kit.d.mts +1 -1
- package/dist/integrations/svelte-kit.d.ts +1 -1
- package/dist/integrations/svelte-kit.mjs +5 -4
- package/dist/oauth2/index.cjs +5 -4
- package/dist/oauth2/index.d.cts +2 -2
- package/dist/oauth2/index.d.mts +2 -2
- package/dist/oauth2/index.d.ts +2 -2
- package/dist/oauth2/index.mjs +5 -4
- package/dist/plugins/admin/index.cjs +6 -5
- package/dist/plugins/admin/index.d.cts +7 -6
- package/dist/plugins/admin/index.d.mts +7 -6
- package/dist/plugins/admin/index.d.ts +7 -6
- package/dist/plugins/admin/index.mjs +6 -5
- package/dist/plugins/anonymous/index.cjs +5 -4
- package/dist/plugins/anonymous/index.d.cts +1 -1
- package/dist/plugins/anonymous/index.d.mts +1 -1
- package/dist/plugins/anonymous/index.d.ts +1 -1
- package/dist/plugins/anonymous/index.mjs +5 -4
- package/dist/plugins/bearer/index.cjs +5 -4
- package/dist/plugins/bearer/index.d.cts +1 -1
- package/dist/plugins/bearer/index.d.mts +1 -1
- package/dist/plugins/bearer/index.d.ts +1 -1
- package/dist/plugins/bearer/index.mjs +5 -4
- package/dist/plugins/captcha/index.cjs +5 -4
- package/dist/plugins/captcha/index.d.cts +1 -1
- package/dist/plugins/captcha/index.d.mts +1 -1
- package/dist/plugins/captcha/index.d.ts +1 -1
- package/dist/plugins/captcha/index.mjs +5 -4
- package/dist/plugins/custom-session/index.cjs +11 -8
- package/dist/plugins/custom-session/index.d.cts +1 -1
- package/dist/plugins/custom-session/index.d.mts +1 -1
- package/dist/plugins/custom-session/index.d.ts +1 -1
- package/dist/plugins/custom-session/index.mjs +11 -8
- package/dist/plugins/device-authorization/index.cjs +52 -19
- package/dist/plugins/device-authorization/index.d.cts +1 -1
- package/dist/plugins/device-authorization/index.d.mts +1 -1
- package/dist/plugins/device-authorization/index.d.ts +1 -1
- package/dist/plugins/device-authorization/index.mjs +52 -19
- package/dist/plugins/email-otp/index.cjs +62 -21
- package/dist/plugins/email-otp/index.d.cts +1 -1
- package/dist/plugins/email-otp/index.d.mts +1 -1
- package/dist/plugins/email-otp/index.d.ts +1 -1
- package/dist/plugins/email-otp/index.mjs +62 -21
- package/dist/plugins/generic-oauth/index.cjs +44 -25
- package/dist/plugins/generic-oauth/index.d.cts +1 -1
- package/dist/plugins/generic-oauth/index.d.mts +1 -1
- package/dist/plugins/generic-oauth/index.d.ts +1 -1
- package/dist/plugins/generic-oauth/index.mjs +44 -25
- package/dist/plugins/haveibeenpwned/index.cjs +5 -4
- package/dist/plugins/haveibeenpwned/index.d.cts +1 -1
- package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
- package/dist/plugins/haveibeenpwned/index.d.ts +1 -1
- package/dist/plugins/haveibeenpwned/index.mjs +5 -4
- package/dist/plugins/index.cjs +11 -10
- package/dist/plugins/index.d.cts +6 -6
- package/dist/plugins/index.d.mts +6 -6
- package/dist/plugins/index.d.ts +6 -6
- package/dist/plugins/index.mjs +13 -12
- package/dist/plugins/jwt/index.cjs +5 -4
- package/dist/plugins/jwt/index.d.cts +1 -1
- package/dist/plugins/jwt/index.d.mts +1 -1
- package/dist/plugins/jwt/index.d.ts +1 -1
- package/dist/plugins/jwt/index.mjs +5 -4
- package/dist/plugins/magic-link/index.cjs +32 -21
- package/dist/plugins/magic-link/index.mjs +32 -21
- package/dist/plugins/multi-session/index.cjs +11 -6
- package/dist/plugins/multi-session/index.d.cts +1 -1
- package/dist/plugins/multi-session/index.d.mts +1 -1
- package/dist/plugins/multi-session/index.d.ts +1 -1
- package/dist/plugins/multi-session/index.mjs +11 -6
- package/dist/plugins/oauth-proxy/index.cjs +11 -6
- package/dist/plugins/oauth-proxy/index.d.cts +1 -1
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.d.ts +1 -1
- package/dist/plugins/oauth-proxy/index.mjs +11 -6
- package/dist/plugins/oidc-provider/index.cjs +6 -5
- package/dist/plugins/oidc-provider/index.d.cts +5 -5
- package/dist/plugins/oidc-provider/index.d.mts +5 -5
- package/dist/plugins/oidc-provider/index.d.ts +5 -5
- package/dist/plugins/oidc-provider/index.mjs +6 -5
- package/dist/plugins/one-tap/index.cjs +8 -7
- package/dist/plugins/one-tap/index.mjs +8 -7
- package/dist/plugins/one-time-token/index.cjs +7 -6
- package/dist/plugins/one-time-token/index.d.cts +1 -1
- package/dist/plugins/one-time-token/index.d.mts +1 -1
- package/dist/plugins/one-time-token/index.d.ts +1 -1
- package/dist/plugins/one-time-token/index.mjs +7 -6
- package/dist/plugins/open-api/index.cjs +5 -4
- package/dist/plugins/open-api/index.d.cts +1 -1
- package/dist/plugins/open-api/index.d.mts +1 -1
- package/dist/plugins/open-api/index.d.ts +1 -1
- package/dist/plugins/open-api/index.mjs +5 -4
- package/dist/plugins/organization/index.cjs +7 -6
- package/dist/plugins/organization/index.d.cts +9 -9
- package/dist/plugins/organization/index.d.mts +9 -9
- package/dist/plugins/organization/index.d.ts +9 -9
- package/dist/plugins/organization/index.mjs +7 -6
- package/dist/plugins/passkey/index.cjs +17 -12
- package/dist/plugins/passkey/index.d.cts +1 -1
- package/dist/plugins/passkey/index.d.mts +1 -1
- package/dist/plugins/passkey/index.d.ts +1 -1
- package/dist/plugins/passkey/index.mjs +17 -12
- package/dist/plugins/phone-number/index.cjs +41 -24
- package/dist/plugins/phone-number/index.d.cts +1 -1
- package/dist/plugins/phone-number/index.d.mts +1 -1
- package/dist/plugins/phone-number/index.d.ts +1 -1
- package/dist/plugins/phone-number/index.mjs +41 -24
- package/dist/plugins/siwe/index.cjs +5 -4
- package/dist/plugins/siwe/index.d.cts +1 -1
- package/dist/plugins/siwe/index.d.mts +1 -1
- package/dist/plugins/siwe/index.d.ts +1 -1
- package/dist/plugins/siwe/index.mjs +5 -4
- package/dist/plugins/sso/index.cjs +89 -62
- package/dist/plugins/sso/index.d.cts +3 -3
- package/dist/plugins/sso/index.d.mts +3 -3
- package/dist/plugins/sso/index.d.ts +3 -3
- package/dist/plugins/sso/index.mjs +89 -62
- package/dist/plugins/two-factor/index.cjs +50 -19
- package/dist/plugins/two-factor/index.d.cts +1 -1
- package/dist/plugins/two-factor/index.d.mts +1 -1
- package/dist/plugins/two-factor/index.d.ts +1 -1
- package/dist/plugins/two-factor/index.mjs +50 -19
- package/dist/plugins/username/index.cjs +18 -11
- package/dist/plugins/username/index.d.cts +19 -19
- package/dist/plugins/username/index.d.mts +19 -19
- package/dist/plugins/username/index.d.ts +19 -19
- package/dist/plugins/username/index.mjs +18 -11
- package/dist/shared/{better-auth.CuyhlHls.cjs → better-auth.1iHKsGdY.cjs} +2 -2
- package/dist/shared/{better-auth.DyZUF2_t.d.ts → better-auth.3es9ZU_K.d.ts} +36 -37
- package/dist/shared/{better-auth.COdnr6eY.cjs → better-auth.B2Bmtu6f.cjs} +83 -47
- package/dist/shared/{better-auth.T3Ux10v9.mjs → better-auth.BAPVOPl3.mjs} +3 -3
- package/dist/shared/{better-auth.DxV4YGX3.mjs → better-auth.BAQSo96z.mjs} +6 -4
- package/dist/shared/{better-auth.cXemjp2M.mjs → better-auth.BHwIy11H.mjs} +83 -47
- package/dist/shared/{better-auth.B1Za4fb4.d.cts → better-auth.BLDIAFp8.d.cts} +5 -5
- package/dist/shared/{better-auth.DHiuXI9L.d.cts → better-auth.BOKSn3AP.d.cts} +36 -37
- package/dist/shared/{better-auth.ZC_QEMLv.d.cts → better-auth.BW0VS3vZ.d.cts} +1 -1
- package/dist/shared/{better-auth.DXd8qaHd.mjs → better-auth.Bc2H_kPB.mjs} +54 -28
- package/dist/shared/{better-auth.DhQzyejE.mjs → better-auth.BoY6Vo7c.mjs} +1 -1
- package/dist/shared/{better-auth.D1jaLDAW.mjs → better-auth.C-9OPnjJ.mjs} +151 -71
- package/dist/shared/{better-auth.A_lT_4ey.cjs → better-auth.C0WkvM-b.cjs} +151 -71
- package/dist/shared/{better-auth.iE8wqp5_.cjs → better-auth.C2xLgiCv.cjs} +1 -1
- package/dist/shared/{better-auth.Cdkx1UlR.cjs → better-auth.C4gSFtQb.cjs} +54 -28
- package/dist/shared/{better-auth.D3u5pPGf.d.ts → better-auth.CAc8m5ps.d.ts} +1 -1
- package/dist/shared/{better-auth.BUqsHDoX.d.ts → better-auth.CBpfh9gd.d.ts} +1 -1
- package/dist/shared/{better-auth.BUmFH1YH.d.mts → better-auth.CHakYG_s.d.mts} +5 -5
- package/dist/shared/{better-auth.Co88PbP3.mjs → better-auth.CIqzVuC5.mjs} +15 -9
- package/dist/shared/{better-auth.DL28hkwE.mjs → better-auth.CJk6lu9H.mjs} +5 -5
- package/dist/shared/{better-auth.wBgaxGEw.cjs → better-auth.CWoe8tep.cjs} +15 -9
- package/dist/shared/{better-auth.TQtfFmwt.mjs → better-auth.Cs4ObP2J.mjs} +246 -139
- package/dist/shared/{better-auth.BftmE2f4.mjs → better-auth.Cw2Wb5xl.mjs} +2 -2
- package/dist/shared/{better-auth.BTmQo2-r.mjs → better-auth.CyhdLtgz.mjs} +122 -54
- package/dist/shared/{better-auth.Cn3gHKIq.d.ts → better-auth.D1mfnXw8.d.ts} +5 -5
- package/dist/shared/better-auth.D2xndZ2p.mjs +5 -0
- package/dist/shared/{better-auth.LBYUF6qL.d.mts → better-auth.D63GoHoT.d.mts} +1 -1
- package/dist/shared/{better-auth.DrO1u8u7.cjs → better-auth.DVpUemsq.cjs} +49 -10
- package/dist/shared/{better-auth.CYRK2rir.cjs → better-auth.DcLnIy5M.cjs} +122 -54
- package/dist/shared/{better-auth.B-RhOtHf.cjs → better-auth.Df7v65t4.cjs} +3 -3
- package/dist/shared/{better-auth.g25nv4YL.mjs → better-auth.DpE8ZxDZ.mjs} +49 -10
- package/dist/shared/{better-auth.8am3GyvS.d.cts → better-auth.DqouI_5s.d.cts} +1 -1
- package/dist/shared/{better-auth.DRmln2Nr.cjs → better-auth.DxBcELEX.cjs} +6 -4
- package/dist/shared/{better-auth.BSU7i7gN.cjs → better-auth.Fhb5xDFB.cjs} +5 -5
- package/dist/shared/{better-auth.CNhgW39t.cjs → better-auth.W6wY8Xk1.cjs} +246 -139
- package/dist/shared/{better-auth.DIfV2UBl.cjs → better-auth.oHfRlmfe.cjs} +1 -1
- package/dist/shared/{better-auth.C3bLnul-.mjs → better-auth.pyHheoY8.mjs} +1 -1
- package/dist/shared/better-auth.uykCWCYS.cjs +7 -0
- package/dist/shared/{better-auth.DQBMcFsm.d.mts → better-auth.vNMd9aBC.d.mts} +36 -37
- package/dist/shared/{better-auth.BC_XVl81.d.mts → better-auth.x83uJ-Ru.d.mts} +1 -1
- package/dist/social-providers/index.cjs +5 -4
- package/dist/social-providers/index.mjs +5 -4
- package/dist/test-utils/index.cjs +10 -9
- package/dist/test-utils/index.d.cts +59 -57
- package/dist/test-utils/index.d.mts +59 -57
- package/dist/test-utils/index.d.ts +59 -57
- package/dist/test-utils/index.mjs +10 -9
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +3 -2
package/dist/plugins/index.d.mts
CHANGED
|
@@ -3,8 +3,8 @@ export { adminAc, defaultAc, defaultRoles, defaultStatements, memberAc, ownerAc
|
|
|
3
3
|
export { TWO_FACTOR_ERROR_CODES, TwoFactorOptions, TwoFactorProvider, TwoFactorTable, UserWithTwoFactor, twoFactor, twoFactorClient } from './two-factor/index.mjs';
|
|
4
4
|
export { USERNAME_ERROR_CODES, UsernameOptions, username } from './username/index.mjs';
|
|
5
5
|
export { bearer } from './bearer/index.mjs';
|
|
6
|
-
import { G as GenericEndpointContext, B as BetterAuthOptions, d as AuthContext } from '../shared/better-auth.
|
|
7
|
-
export { z as AuthEndpoint, D as AuthMiddleware, v as AuthPluginSchema, n as BetterAuthPlugin, I as InferOptionSchema, p as InferPluginErrorCodes, y as createAuthEndpoint, x as createAuthMiddleware, w as optionsMiddleware } from '../shared/better-auth.
|
|
6
|
+
import { G as GenericEndpointContext, B as BetterAuthOptions, d as AuthContext } from '../shared/better-auth.vNMd9aBC.mjs';
|
|
7
|
+
export { z as AuthEndpoint, D as AuthMiddleware, v as AuthPluginSchema, n as BetterAuthPlugin, I as InferOptionSchema, p as InferPluginErrorCodes, y as createAuthEndpoint, x as createAuthMiddleware, w as optionsMiddleware } from '../shared/better-auth.vNMd9aBC.mjs';
|
|
8
8
|
export { H as HIDE_METADATA } from '../shared/better-auth.DEHJp1rk.mjs';
|
|
9
9
|
export { magicLink } from './magic-link/index.mjs';
|
|
10
10
|
export { PhoneNumberOptions, UserWithPhoneNumber, phoneNumber } from './phone-number/index.mjs';
|
|
@@ -21,7 +21,7 @@ export { OpenAPIOptions, Path, generator, openAPI } from './open-api/index.mjs';
|
|
|
21
21
|
import { OIDCOptions, OIDCMetadata, OAuthAccessToken } from './oidc-provider/index.mjs';
|
|
22
22
|
export { AuthorizationQuery, Client, CodeVerificationValue, TokenBody, getClient, getMetadata, oidcProvider } from './oidc-provider/index.mjs';
|
|
23
23
|
export { captcha } from './captcha/index.mjs';
|
|
24
|
-
export { A as API_KEY_TABLE_NAME, E as ERROR_CODES, a as apiKey, d as defaultKeyHasher } from '../shared/better-auth.
|
|
24
|
+
export { A as API_KEY_TABLE_NAME, E as ERROR_CODES, a as apiKey, d as defaultKeyHasher } from '../shared/better-auth.CHakYG_s.mjs';
|
|
25
25
|
export { HaveIBeenPwnedOptions, haveIBeenPwned } from './haveibeenpwned/index.mjs';
|
|
26
26
|
export { oneTimeToken } from './one-time-token/index.mjs';
|
|
27
27
|
import * as better_call from 'better-call';
|
|
@@ -146,7 +146,7 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
146
146
|
};
|
|
147
147
|
path: "/.well-known/oauth-protected-resource";
|
|
148
148
|
};
|
|
149
|
-
|
|
149
|
+
mcpOAuthAuthorize: {
|
|
150
150
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
|
|
151
151
|
body?: undefined;
|
|
152
152
|
} & {
|
|
@@ -266,7 +266,7 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
266
266
|
redirect_uris: string[];
|
|
267
267
|
token_endpoint_auth_method?: "none" | "client_secret_basic" | "client_secret_post" | undefined;
|
|
268
268
|
grant_types?: ("authorization_code" | "password" | "refresh_token" | "implicit" | "client_credentials" | "urn:ietf:params:oauth:grant-type:jwt-bearer" | "urn:ietf:params:oauth:grant-type:saml2-bearer")[] | undefined;
|
|
269
|
-
response_types?: ("
|
|
269
|
+
response_types?: ("code" | "token")[] | undefined;
|
|
270
270
|
client_name?: string | undefined;
|
|
271
271
|
client_uri?: string | undefined;
|
|
272
272
|
logo_uri?: string | undefined;
|
|
@@ -322,8 +322,8 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
322
322
|
"urn:ietf:params:oauth:grant-type:saml2-bearer": "urn:ietf:params:oauth:grant-type:saml2-bearer";
|
|
323
323
|
}>>>>;
|
|
324
324
|
response_types: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
325
|
-
token: "token";
|
|
326
325
|
code: "code";
|
|
326
|
+
token: "token";
|
|
327
327
|
}>>>>;
|
|
328
328
|
client_name: z.ZodOptional<z.ZodString>;
|
|
329
329
|
client_uri: z.ZodOptional<z.ZodString>;
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export { adminAc, defaultAc, defaultRoles, defaultStatements, memberAc, ownerAc
|
|
|
3
3
|
export { TWO_FACTOR_ERROR_CODES, TwoFactorOptions, TwoFactorProvider, TwoFactorTable, UserWithTwoFactor, twoFactor, twoFactorClient } from './two-factor/index.js';
|
|
4
4
|
export { USERNAME_ERROR_CODES, UsernameOptions, username } from './username/index.js';
|
|
5
5
|
export { bearer } from './bearer/index.js';
|
|
6
|
-
import { G as GenericEndpointContext, B as BetterAuthOptions, d as AuthContext } from '../shared/better-auth.
|
|
7
|
-
export { z as AuthEndpoint, D as AuthMiddleware, v as AuthPluginSchema, n as BetterAuthPlugin, I as InferOptionSchema, p as InferPluginErrorCodes, y as createAuthEndpoint, x as createAuthMiddleware, w as optionsMiddleware } from '../shared/better-auth.
|
|
6
|
+
import { G as GenericEndpointContext, B as BetterAuthOptions, d as AuthContext } from '../shared/better-auth.3es9ZU_K.js';
|
|
7
|
+
export { z as AuthEndpoint, D as AuthMiddleware, v as AuthPluginSchema, n as BetterAuthPlugin, I as InferOptionSchema, p as InferPluginErrorCodes, y as createAuthEndpoint, x as createAuthMiddleware, w as optionsMiddleware } from '../shared/better-auth.3es9ZU_K.js';
|
|
8
8
|
export { H as HIDE_METADATA } from '../shared/better-auth.DEHJp1rk.js';
|
|
9
9
|
export { magicLink } from './magic-link/index.js';
|
|
10
10
|
export { PhoneNumberOptions, UserWithPhoneNumber, phoneNumber } from './phone-number/index.js';
|
|
@@ -21,7 +21,7 @@ export { OpenAPIOptions, Path, generator, openAPI } from './open-api/index.js';
|
|
|
21
21
|
import { OIDCOptions, OIDCMetadata, OAuthAccessToken } from './oidc-provider/index.js';
|
|
22
22
|
export { AuthorizationQuery, Client, CodeVerificationValue, TokenBody, getClient, getMetadata, oidcProvider } from './oidc-provider/index.js';
|
|
23
23
|
export { captcha } from './captcha/index.js';
|
|
24
|
-
export { A as API_KEY_TABLE_NAME, E as ERROR_CODES, a as apiKey, d as defaultKeyHasher } from '../shared/better-auth.
|
|
24
|
+
export { A as API_KEY_TABLE_NAME, E as ERROR_CODES, a as apiKey, d as defaultKeyHasher } from '../shared/better-auth.D1mfnXw8.js';
|
|
25
25
|
export { HaveIBeenPwnedOptions, haveIBeenPwned } from './haveibeenpwned/index.js';
|
|
26
26
|
export { oneTimeToken } from './one-time-token/index.js';
|
|
27
27
|
import * as better_call from 'better-call';
|
|
@@ -146,7 +146,7 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
146
146
|
};
|
|
147
147
|
path: "/.well-known/oauth-protected-resource";
|
|
148
148
|
};
|
|
149
|
-
|
|
149
|
+
mcpOAuthAuthorize: {
|
|
150
150
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
|
|
151
151
|
body?: undefined;
|
|
152
152
|
} & {
|
|
@@ -266,7 +266,7 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
266
266
|
redirect_uris: string[];
|
|
267
267
|
token_endpoint_auth_method?: "none" | "client_secret_basic" | "client_secret_post" | undefined;
|
|
268
268
|
grant_types?: ("authorization_code" | "password" | "refresh_token" | "implicit" | "client_credentials" | "urn:ietf:params:oauth:grant-type:jwt-bearer" | "urn:ietf:params:oauth:grant-type:saml2-bearer")[] | undefined;
|
|
269
|
-
response_types?: ("
|
|
269
|
+
response_types?: ("code" | "token")[] | undefined;
|
|
270
270
|
client_name?: string | undefined;
|
|
271
271
|
client_uri?: string | undefined;
|
|
272
272
|
logo_uri?: string | undefined;
|
|
@@ -322,8 +322,8 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
322
322
|
"urn:ietf:params:oauth:grant-type:saml2-bearer": "urn:ietf:params:oauth:grant-type:saml2-bearer";
|
|
323
323
|
}>>>>;
|
|
324
324
|
response_types: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
325
|
-
token: "token";
|
|
326
325
|
code: "code";
|
|
326
|
+
token: "token";
|
|
327
327
|
}>>>>;
|
|
328
328
|
client_name: z.ZodOptional<z.ZodString>;
|
|
329
329
|
client_uri: z.ZodOptional<z.ZodString>;
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { o as organization, p as parseRoles } from '../shared/better-auth.
|
|
1
|
+
export { o as organization, p as parseRoles } from '../shared/better-auth.Cs4ObP2J.mjs';
|
|
2
2
|
export { TWO_FACTOR_ERROR_CODES, twoFactor } from './two-factor/index.mjs';
|
|
3
3
|
export { USERNAME_ERROR_CODES, username } from './username/index.mjs';
|
|
4
4
|
export { bearer } from './bearer/index.mjs';
|
|
5
|
-
import { g as getSessionFromCtx, a as createAuthEndpoint, c as createAuthMiddleware } from '../shared/better-auth.
|
|
6
|
-
export { o as optionsMiddleware } from '../shared/better-auth.
|
|
7
|
-
export { H as HIDE_METADATA } from '../shared/better-auth.
|
|
5
|
+
import { g as getSessionFromCtx, a as createAuthEndpoint, c as createAuthMiddleware } from '../shared/better-auth.CIqzVuC5.mjs';
|
|
6
|
+
export { o as optionsMiddleware } from '../shared/better-auth.CIqzVuC5.mjs';
|
|
7
|
+
export { H as HIDE_METADATA } from '../shared/better-auth.C-9OPnjJ.mjs';
|
|
8
8
|
export { magicLink } from './magic-link/index.mjs';
|
|
9
9
|
export { phoneNumber } from './phone-number/index.mjs';
|
|
10
10
|
export { anonymous } from './anonymous/index.mjs';
|
|
11
|
-
export { a as admin } from '../shared/better-auth.
|
|
11
|
+
export { a as admin } from '../shared/better-auth.CyhdLtgz.mjs';
|
|
12
12
|
export { genericOAuth } from './generic-oauth/index.mjs';
|
|
13
13
|
export { jwt } from './jwt/index.mjs';
|
|
14
14
|
export { multiSession } from './multi-session/index.mjs';
|
|
@@ -17,10 +17,10 @@ export { oneTap } from './one-tap/index.mjs';
|
|
|
17
17
|
export { oAuthProxy } from './oauth-proxy/index.mjs';
|
|
18
18
|
export { customSession } from './custom-session/index.mjs';
|
|
19
19
|
export { openAPI } from './open-api/index.mjs';
|
|
20
|
-
import { o as oidcProvider, s as schema } from '../shared/better-auth.
|
|
21
|
-
export { g as getClient, a as getMetadata } from '../shared/better-auth.
|
|
20
|
+
import { o as oidcProvider, s as schema } from '../shared/better-auth.Bc2H_kPB.mjs';
|
|
21
|
+
export { g as getClient, a as getMetadata } from '../shared/better-auth.Bc2H_kPB.mjs';
|
|
22
22
|
export { captcha } from './captcha/index.mjs';
|
|
23
|
-
export { A as API_KEY_TABLE_NAME, E as ERROR_CODES, a as apiKey, d as defaultKeyHasher, o as oneTimeToken } from '../shared/better-auth.
|
|
23
|
+
export { A as API_KEY_TABLE_NAME, E as ERROR_CODES, a as apiKey, d as defaultKeyHasher, o as oneTimeToken } from '../shared/better-auth.BHwIy11H.mjs';
|
|
24
24
|
export { haveIBeenPwned } from './haveibeenpwned/index.mjs';
|
|
25
25
|
import * as z from 'zod';
|
|
26
26
|
import { APIError } from 'better-call';
|
|
@@ -28,11 +28,11 @@ import { b as isProduction } from '../shared/better-auth.CiuwFiHM.mjs';
|
|
|
28
28
|
import { base64 } from '@better-auth/utils/base64';
|
|
29
29
|
import '@better-auth/utils/hmac';
|
|
30
30
|
import { a as logger } from '../shared/better-auth.C4g12FAA.mjs';
|
|
31
|
-
import { a as getBaseURL } from '../shared/better-auth.
|
|
31
|
+
import { a as getBaseURL } from '../shared/better-auth.BAQSo96z.mjs';
|
|
32
32
|
import '@better-auth/utils/binary';
|
|
33
|
-
import { p as parseSetCookieHeader } from '../shared/better-auth.
|
|
33
|
+
import { p as parseSetCookieHeader } from '../shared/better-auth.pyHheoY8.mjs';
|
|
34
34
|
import '../shared/better-auth.CJ2rnsDV.mjs';
|
|
35
|
-
import '../shared/better-auth.
|
|
35
|
+
import '../shared/better-auth.Cw2Wb5xl.mjs';
|
|
36
36
|
import './organization/access/index.mjs';
|
|
37
37
|
import '@better-auth/utils/random';
|
|
38
38
|
import { createHash } from '@better-auth/utils/hash';
|
|
@@ -57,6 +57,7 @@ export { d as deviceAuthorizationClient } from '../shared/better-auth.BpA03GIs.m
|
|
|
57
57
|
import '../shared/better-auth.CW6D9eSx.mjs';
|
|
58
58
|
import '../shared/better-auth.DdzSJf-n.mjs';
|
|
59
59
|
import '../shared/better-auth.msGOU0m9.mjs';
|
|
60
|
+
import '../shared/better-auth.D2xndZ2p.mjs';
|
|
60
61
|
import '../shared/better-auth.DaEBQJp_.mjs';
|
|
61
62
|
import '../shared/better-auth.BxexnJiR.mjs';
|
|
62
63
|
import '../crypto/index.mjs';
|
|
@@ -413,7 +414,7 @@ const mcp = (options) => {
|
|
|
413
414
|
return c.json(metadata);
|
|
414
415
|
}
|
|
415
416
|
),
|
|
416
|
-
|
|
417
|
+
mcpOAuthAuthorize: createAuthEndpoint(
|
|
417
418
|
"/mcp/authorize",
|
|
418
419
|
{
|
|
419
420
|
method: "GET",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
const sign = require('../../shared/better-auth.CMwM5enp.cjs');
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
|
-
require('../../shared/better-auth.
|
|
6
|
-
const session = require('../../shared/better-auth.
|
|
5
|
+
require('../../shared/better-auth.C0WkvM-b.cjs');
|
|
6
|
+
const session = require('../../shared/better-auth.CWoe8tep.cjs');
|
|
7
7
|
const z = require('zod');
|
|
8
8
|
const index = require('../../shared/better-auth.ANpbi45u.cjs');
|
|
9
9
|
require('../../shared/better-auth.B6fIklBU.cjs');
|
|
@@ -25,12 +25,13 @@ require('@better-auth/utils/random');
|
|
|
25
25
|
require('@better-auth/utils');
|
|
26
26
|
require('../../shared/better-auth.C1hdVENX.cjs');
|
|
27
27
|
require('@better-fetch/fetch');
|
|
28
|
-
require('../../shared/better-auth.
|
|
29
|
-
require('../../shared/better-auth.
|
|
28
|
+
require('../../shared/better-auth.DxBcELEX.cjs');
|
|
29
|
+
require('../../shared/better-auth.oHfRlmfe.cjs');
|
|
30
30
|
require('../../shared/better-auth.DgMx7bVs.cjs');
|
|
31
31
|
require('jose/errors');
|
|
32
32
|
require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
33
33
|
require('defu');
|
|
34
|
+
require('../../shared/better-auth.uykCWCYS.cjs');
|
|
34
35
|
|
|
35
36
|
function _interopNamespaceCompat(e) {
|
|
36
37
|
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import * as z from 'zod';
|
|
3
|
-
import { U as User, S as Session, I as InferOptionSchema, G as GenericEndpointContext, H as HookEndpointContext } from '../../shared/better-auth.
|
|
3
|
+
import { U as User, S as Session, I as InferOptionSchema, G as GenericEndpointContext, H as HookEndpointContext } from '../../shared/better-auth.BOKSn3AP.cjs';
|
|
4
4
|
import * as jose from 'jose';
|
|
5
5
|
import { JWTPayload, JSONWebKeySet } from 'jose';
|
|
6
6
|
import { A as Awaitable } from '../../shared/better-auth.DTtXpZYr.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import * as z from 'zod';
|
|
3
|
-
import { U as User, S as Session, I as InferOptionSchema, G as GenericEndpointContext, H as HookEndpointContext } from '../../shared/better-auth.
|
|
3
|
+
import { U as User, S as Session, I as InferOptionSchema, G as GenericEndpointContext, H as HookEndpointContext } from '../../shared/better-auth.vNMd9aBC.mjs';
|
|
4
4
|
import * as jose from 'jose';
|
|
5
5
|
import { JWTPayload, JSONWebKeySet } from 'jose';
|
|
6
6
|
import { A as Awaitable } from '../../shared/better-auth.DTtXpZYr.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import * as z from 'zod';
|
|
3
|
-
import { U as User, S as Session, I as InferOptionSchema, G as GenericEndpointContext, H as HookEndpointContext } from '../../shared/better-auth.
|
|
3
|
+
import { U as User, S as Session, I as InferOptionSchema, G as GenericEndpointContext, H as HookEndpointContext } from '../../shared/better-auth.3es9ZU_K.js';
|
|
4
4
|
import * as jose from 'jose';
|
|
5
5
|
import { JWTPayload, JSONWebKeySet } from 'jose';
|
|
6
6
|
import { A as Awaitable } from '../../shared/better-auth.DTtXpZYr.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { g as getJwtToken, s as signJWT, a as getJwksAdapter, c as createJwk } from '../../shared/better-auth.DDuRjwGK.mjs';
|
|
2
2
|
export { b as generateExportedKeyPair } from '../../shared/better-auth.DDuRjwGK.mjs';
|
|
3
3
|
import { APIError } from 'better-call';
|
|
4
|
-
import '../../shared/better-auth.
|
|
5
|
-
import { c as createAuthMiddleware, a as createAuthEndpoint, s as sessionMiddleware } from '../../shared/better-auth.
|
|
4
|
+
import '../../shared/better-auth.C-9OPnjJ.mjs';
|
|
5
|
+
import { c as createAuthMiddleware, a as createAuthEndpoint, s as sessionMiddleware } from '../../shared/better-auth.CIqzVuC5.mjs';
|
|
6
6
|
import * as z from 'zod';
|
|
7
7
|
import { B as BetterAuthError } from '../../shared/better-auth.DdzSJf-n.mjs';
|
|
8
8
|
import '../../shared/better-auth.CiuwFiHM.mjs';
|
|
@@ -24,12 +24,13 @@ import '@better-auth/utils/random';
|
|
|
24
24
|
import '@better-auth/utils';
|
|
25
25
|
import '../../shared/better-auth.CW6D9eSx.mjs';
|
|
26
26
|
import '@better-fetch/fetch';
|
|
27
|
-
import '../../shared/better-auth.
|
|
28
|
-
import '../../shared/better-auth.
|
|
27
|
+
import '../../shared/better-auth.BAQSo96z.mjs';
|
|
28
|
+
import '../../shared/better-auth.pyHheoY8.mjs';
|
|
29
29
|
import '../../shared/better-auth.CvNZNAOW.mjs';
|
|
30
30
|
import 'jose/errors';
|
|
31
31
|
import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
32
32
|
import 'defu';
|
|
33
|
+
import '../../shared/better-auth.D2xndZ2p.mjs';
|
|
33
34
|
|
|
34
35
|
const schema = {
|
|
35
36
|
jwks: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const z = require('zod');
|
|
4
|
-
const session = require('../../shared/better-auth.
|
|
4
|
+
const session = require('../../shared/better-auth.CWoe8tep.cjs');
|
|
5
5
|
const betterCall = require('better-call');
|
|
6
|
-
const cookies_index = require('../../shared/better-auth.
|
|
6
|
+
const cookies_index = require('../../shared/better-auth.oHfRlmfe.cjs');
|
|
7
7
|
const hash = require('@better-auth/utils/hash');
|
|
8
8
|
require('@noble/ciphers/chacha.js');
|
|
9
9
|
require('@noble/ciphers/utils.js');
|
|
@@ -13,16 +13,17 @@ require('@noble/hashes/scrypt.js');
|
|
|
13
13
|
require('@better-auth/utils/hex');
|
|
14
14
|
require('@noble/hashes/utils.js');
|
|
15
15
|
const random = require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
16
|
-
const socialProviders_index = require('../../shared/better-auth.
|
|
16
|
+
const socialProviders_index = require('../../shared/better-auth.C0WkvM-b.cjs');
|
|
17
17
|
require('../../shared/better-auth.DcYLM7Us.cjs');
|
|
18
18
|
require('../../shared/better-auth.B6fIklBU.cjs');
|
|
19
19
|
require('../../shared/better-auth.DTvRBuq4.cjs');
|
|
20
20
|
require('../../shared/better-auth.C1hdVENX.cjs');
|
|
21
21
|
require('../../shared/better-auth.DgMx7bVs.cjs');
|
|
22
|
+
require('../../shared/better-auth.uykCWCYS.cjs');
|
|
22
23
|
require('@better-auth/utils/hmac');
|
|
23
24
|
require('@better-auth/utils/binary');
|
|
24
25
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
25
|
-
require('../../shared/better-auth.
|
|
26
|
+
require('../../shared/better-auth.DxBcELEX.cjs');
|
|
26
27
|
require('@better-auth/utils/random');
|
|
27
28
|
require('../../crypto/index.cjs');
|
|
28
29
|
require('@better-fetch/fetch');
|
|
@@ -92,15 +93,21 @@ const magicLink = (options) => {
|
|
|
92
93
|
method: "POST",
|
|
93
94
|
requireHeaders: true,
|
|
94
95
|
body: z__namespace.object({
|
|
95
|
-
email: z__namespace.string().
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
).
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
email: z__namespace.string().meta({
|
|
97
|
+
description: "Email address to send the magic link"
|
|
98
|
+
}).email(),
|
|
99
|
+
name: z__namespace.string().meta({
|
|
100
|
+
description: 'User display name. Only used if the user is registering for the first time. Eg: "my-name"'
|
|
101
|
+
}).optional(),
|
|
102
|
+
callbackURL: z__namespace.string().meta({
|
|
103
|
+
description: "URL to redirect after magic link verification"
|
|
104
|
+
}).optional(),
|
|
105
|
+
newUserCallbackURL: z__namespace.string().meta({
|
|
106
|
+
description: "URL to redirect after new user signup. Only used if the user is registering for the first time."
|
|
107
|
+
}).optional(),
|
|
108
|
+
errorCallbackURL: z__namespace.string().meta({
|
|
109
|
+
description: "URL to redirect after error."
|
|
110
|
+
}).optional()
|
|
104
111
|
}),
|
|
105
112
|
metadata: {
|
|
106
113
|
openapi: {
|
|
@@ -198,14 +205,18 @@ const magicLink = (options) => {
|
|
|
198
205
|
{
|
|
199
206
|
method: "GET",
|
|
200
207
|
query: z__namespace.object({
|
|
201
|
-
token: z__namespace.string().
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
).
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
token: z__namespace.string().meta({
|
|
209
|
+
description: "Verification token"
|
|
210
|
+
}),
|
|
211
|
+
callbackURL: z__namespace.string().meta({
|
|
212
|
+
description: 'URL to redirect after magic link verification, if not provided the user will be redirected to the root URL. Eg: "/dashboard"'
|
|
213
|
+
}).optional(),
|
|
214
|
+
errorCallbackURL: z__namespace.string().meta({
|
|
215
|
+
description: "URL to redirect after error."
|
|
216
|
+
}).optional(),
|
|
217
|
+
newUserCallbackURL: z__namespace.string().meta({
|
|
218
|
+
description: "URL to redirect after new user signup. Only used if the user is registering for the first time."
|
|
219
|
+
}).optional()
|
|
209
220
|
}),
|
|
210
221
|
use: [
|
|
211
222
|
socialProviders_index.originCheck((ctx) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { a as createAuthEndpoint, B as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
2
|
+
import { a as createAuthEndpoint, B as BASE_ERROR_CODES } from '../../shared/better-auth.CIqzVuC5.mjs';
|
|
3
3
|
import { APIError } from 'better-call';
|
|
4
|
-
import { s as setSessionCookie } from '../../shared/better-auth.
|
|
4
|
+
import { s as setSessionCookie } from '../../shared/better-auth.pyHheoY8.mjs';
|
|
5
5
|
import { createHash } from '@better-auth/utils/hash';
|
|
6
6
|
import '@noble/ciphers/chacha.js';
|
|
7
7
|
import '@noble/ciphers/utils.js';
|
|
@@ -11,16 +11,17 @@ import '@noble/hashes/scrypt.js';
|
|
|
11
11
|
import '@better-auth/utils/hex';
|
|
12
12
|
import '@noble/hashes/utils.js';
|
|
13
13
|
import { g as generateRandomString } from '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
14
|
-
import { o as originCheck } from '../../shared/better-auth.
|
|
14
|
+
import { o as originCheck } from '../../shared/better-auth.C-9OPnjJ.mjs';
|
|
15
15
|
import '../../shared/better-auth.CJ2rnsDV.mjs';
|
|
16
16
|
import '../../shared/better-auth.CiuwFiHM.mjs';
|
|
17
17
|
import '../../shared/better-auth.C4g12FAA.mjs';
|
|
18
18
|
import '../../shared/better-auth.CW6D9eSx.mjs';
|
|
19
19
|
import '../../shared/better-auth.CvNZNAOW.mjs';
|
|
20
|
+
import '../../shared/better-auth.D2xndZ2p.mjs';
|
|
20
21
|
import '@better-auth/utils/hmac';
|
|
21
22
|
import '@better-auth/utils/binary';
|
|
22
23
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
23
|
-
import '../../shared/better-auth.
|
|
24
|
+
import '../../shared/better-auth.BAQSo96z.mjs';
|
|
24
25
|
import '@better-auth/utils/random';
|
|
25
26
|
import '../../crypto/index.mjs';
|
|
26
27
|
import '@better-fetch/fetch';
|
|
@@ -76,15 +77,21 @@ const magicLink = (options) => {
|
|
|
76
77
|
method: "POST",
|
|
77
78
|
requireHeaders: true,
|
|
78
79
|
body: z.object({
|
|
79
|
-
email: z.string().
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
).
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
email: z.string().meta({
|
|
81
|
+
description: "Email address to send the magic link"
|
|
82
|
+
}).email(),
|
|
83
|
+
name: z.string().meta({
|
|
84
|
+
description: 'User display name. Only used if the user is registering for the first time. Eg: "my-name"'
|
|
85
|
+
}).optional(),
|
|
86
|
+
callbackURL: z.string().meta({
|
|
87
|
+
description: "URL to redirect after magic link verification"
|
|
88
|
+
}).optional(),
|
|
89
|
+
newUserCallbackURL: z.string().meta({
|
|
90
|
+
description: "URL to redirect after new user signup. Only used if the user is registering for the first time."
|
|
91
|
+
}).optional(),
|
|
92
|
+
errorCallbackURL: z.string().meta({
|
|
93
|
+
description: "URL to redirect after error."
|
|
94
|
+
}).optional()
|
|
88
95
|
}),
|
|
89
96
|
metadata: {
|
|
90
97
|
openapi: {
|
|
@@ -182,14 +189,18 @@ const magicLink = (options) => {
|
|
|
182
189
|
{
|
|
183
190
|
method: "GET",
|
|
184
191
|
query: z.object({
|
|
185
|
-
token: z.string().
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
).
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
192
|
+
token: z.string().meta({
|
|
193
|
+
description: "Verification token"
|
|
194
|
+
}),
|
|
195
|
+
callbackURL: z.string().meta({
|
|
196
|
+
description: 'URL to redirect after magic link verification, if not provided the user will be redirected to the root URL. Eg: "/dashboard"'
|
|
197
|
+
}).optional(),
|
|
198
|
+
errorCallbackURL: z.string().meta({
|
|
199
|
+
description: "URL to redirect after error."
|
|
200
|
+
}).optional(),
|
|
201
|
+
newUserCallbackURL: z.string().meta({
|
|
202
|
+
description: "URL to redirect after new user signup. Only used if the user is registering for the first time."
|
|
203
|
+
}).optional()
|
|
193
204
|
}),
|
|
194
205
|
use: [
|
|
195
206
|
originCheck((ctx) => {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const z = require('zod');
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
|
-
require('../../shared/better-auth.
|
|
6
|
-
const session = require('../../shared/better-auth.
|
|
7
|
-
const cookies_index = require('../../shared/better-auth.
|
|
5
|
+
require('../../shared/better-auth.C0WkvM-b.cjs');
|
|
6
|
+
const session = require('../../shared/better-auth.CWoe8tep.cjs');
|
|
7
|
+
const cookies_index = require('../../shared/better-auth.oHfRlmfe.cjs');
|
|
8
8
|
require('../../shared/better-auth.DcYLM7Us.cjs');
|
|
9
9
|
require('../../shared/better-auth.B6fIklBU.cjs');
|
|
10
10
|
require('../../shared/better-auth.DTvRBuq4.cjs');
|
|
@@ -22,13 +22,14 @@ require('../../shared/better-auth.ANpbi45u.cjs');
|
|
|
22
22
|
require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
23
23
|
require('@better-auth/utils/random');
|
|
24
24
|
require('@better-fetch/fetch');
|
|
25
|
-
require('../../shared/better-auth.
|
|
25
|
+
require('../../shared/better-auth.DxBcELEX.cjs');
|
|
26
26
|
require('jose/errors');
|
|
27
27
|
require('../../shared/better-auth.DgMx7bVs.cjs');
|
|
28
28
|
require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
29
29
|
require('@better-auth/utils/hmac');
|
|
30
30
|
require('@better-auth/utils/binary');
|
|
31
31
|
require('defu');
|
|
32
|
+
require('../../shared/better-auth.uykCWCYS.cjs');
|
|
32
33
|
|
|
33
34
|
function _interopNamespaceCompat(e) {
|
|
34
35
|
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
@@ -123,7 +124,9 @@ const multiSession = (options) => {
|
|
|
123
124
|
{
|
|
124
125
|
method: "POST",
|
|
125
126
|
body: z__namespace.object({
|
|
126
|
-
sessionToken: z__namespace.string().
|
|
127
|
+
sessionToken: z__namespace.string().meta({
|
|
128
|
+
description: "The session token to set as active"
|
|
129
|
+
})
|
|
127
130
|
}),
|
|
128
131
|
requireHeaders: true,
|
|
129
132
|
use: [session.sessionMiddleware],
|
|
@@ -196,7 +199,9 @@ const multiSession = (options) => {
|
|
|
196
199
|
{
|
|
197
200
|
method: "POST",
|
|
198
201
|
body: z__namespace.object({
|
|
199
|
-
sessionToken: z__namespace.string().
|
|
202
|
+
sessionToken: z__namespace.string().meta({
|
|
203
|
+
description: "The session token to revoke"
|
|
204
|
+
})
|
|
200
205
|
}),
|
|
201
206
|
requireHeaders: true,
|
|
202
207
|
use: [session.sessionMiddleware],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import * as z from 'zod';
|
|
3
|
-
import { S as Session, U as User, H as HookEndpointContext } from '../../shared/better-auth.
|
|
3
|
+
import { S as Session, U as User, H as HookEndpointContext } from '../../shared/better-auth.BOKSn3AP.cjs';
|
|
4
4
|
import 'kysely';
|
|
5
5
|
import '../../shared/better-auth.v_lf-jeY.cjs';
|
|
6
6
|
import '../../shared/better-auth.DTtXpZYr.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import * as z from 'zod';
|
|
3
|
-
import { S as Session, U as User, H as HookEndpointContext } from '../../shared/better-auth.
|
|
3
|
+
import { S as Session, U as User, H as HookEndpointContext } from '../../shared/better-auth.vNMd9aBC.mjs';
|
|
4
4
|
import 'kysely';
|
|
5
5
|
import '../../shared/better-auth.XefKa8DI.mjs';
|
|
6
6
|
import '../../shared/better-auth.DTtXpZYr.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import * as z from 'zod';
|
|
3
|
-
import { S as Session, U as User, H as HookEndpointContext } from '../../shared/better-auth.
|
|
3
|
+
import { S as Session, U as User, H as HookEndpointContext } from '../../shared/better-auth.3es9ZU_K.js';
|
|
4
4
|
import 'kysely';
|
|
5
5
|
import '../../shared/better-auth.4SXCyo06.js';
|
|
6
6
|
import '../../shared/better-auth.DTtXpZYr.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
|
-
import '../../shared/better-auth.
|
|
4
|
-
import { c as createAuthMiddleware, a as createAuthEndpoint, s as sessionMiddleware } from '../../shared/better-auth.
|
|
5
|
-
import { p as parseSetCookieHeader, a as parseCookies, s as setSessionCookie, d as deleteSessionCookie } from '../../shared/better-auth.
|
|
3
|
+
import '../../shared/better-auth.C-9OPnjJ.mjs';
|
|
4
|
+
import { c as createAuthMiddleware, a as createAuthEndpoint, s as sessionMiddleware } from '../../shared/better-auth.CIqzVuC5.mjs';
|
|
5
|
+
import { p as parseSetCookieHeader, a as parseCookies, s as setSessionCookie, d as deleteSessionCookie } from '../../shared/better-auth.pyHheoY8.mjs';
|
|
6
6
|
import '../../shared/better-auth.CJ2rnsDV.mjs';
|
|
7
7
|
import '../../shared/better-auth.CiuwFiHM.mjs';
|
|
8
8
|
import '../../shared/better-auth.C4g12FAA.mjs';
|
|
@@ -20,13 +20,14 @@ import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
|
20
20
|
import '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
21
21
|
import '@better-auth/utils/random';
|
|
22
22
|
import '@better-fetch/fetch';
|
|
23
|
-
import '../../shared/better-auth.
|
|
23
|
+
import '../../shared/better-auth.BAQSo96z.mjs';
|
|
24
24
|
import 'jose/errors';
|
|
25
25
|
import '../../shared/better-auth.CvNZNAOW.mjs';
|
|
26
26
|
import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
27
27
|
import '@better-auth/utils/hmac';
|
|
28
28
|
import '@better-auth/utils/binary';
|
|
29
29
|
import 'defu';
|
|
30
|
+
import '../../shared/better-auth.D2xndZ2p.mjs';
|
|
30
31
|
|
|
31
32
|
const multiSession = (options) => {
|
|
32
33
|
const opts = {
|
|
@@ -107,7 +108,9 @@ const multiSession = (options) => {
|
|
|
107
108
|
{
|
|
108
109
|
method: "POST",
|
|
109
110
|
body: z.object({
|
|
110
|
-
sessionToken: z.string().
|
|
111
|
+
sessionToken: z.string().meta({
|
|
112
|
+
description: "The session token to set as active"
|
|
113
|
+
})
|
|
111
114
|
}),
|
|
112
115
|
requireHeaders: true,
|
|
113
116
|
use: [sessionMiddleware],
|
|
@@ -180,7 +183,9 @@ const multiSession = (options) => {
|
|
|
180
183
|
{
|
|
181
184
|
method: "POST",
|
|
182
185
|
body: z.object({
|
|
183
|
-
sessionToken: z.string().
|
|
186
|
+
sessionToken: z.string().meta({
|
|
187
|
+
description: "The session token to revoke"
|
|
188
|
+
})
|
|
184
189
|
}),
|
|
185
190
|
requireHeaders: true,
|
|
186
191
|
use: [sessionMiddleware],
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
const z = require('zod');
|
|
4
4
|
require('better-call');
|
|
5
|
-
const socialProviders_index = require('../../shared/better-auth.
|
|
6
|
-
const session = require('../../shared/better-auth.
|
|
5
|
+
const socialProviders_index = require('../../shared/better-auth.C0WkvM-b.cjs');
|
|
6
|
+
const session = require('../../shared/better-auth.CWoe8tep.cjs');
|
|
7
7
|
const env = require('../../shared/better-auth.B6fIklBU.cjs');
|
|
8
8
|
require('@better-auth/utils/base64');
|
|
9
9
|
require('@better-auth/utils/hmac');
|
|
10
10
|
require('../../shared/better-auth.DTvRBuq4.cjs');
|
|
11
|
-
const url = require('../../shared/better-auth.
|
|
11
|
+
const url = require('../../shared/better-auth.DxBcELEX.cjs');
|
|
12
12
|
require('@better-auth/utils/binary');
|
|
13
13
|
require('../../shared/better-auth.DcYLM7Us.cjs');
|
|
14
14
|
const crypto_index = require('../../crypto/index.cjs');
|
|
@@ -23,12 +23,13 @@ require('@better-auth/utils/hex');
|
|
|
23
23
|
require('@noble/hashes/utils.js');
|
|
24
24
|
require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
25
25
|
require('@better-auth/utils/random');
|
|
26
|
-
require('../../shared/better-auth.
|
|
26
|
+
require('../../shared/better-auth.oHfRlmfe.cjs');
|
|
27
27
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
28
28
|
require('../../shared/better-auth.DgMx7bVs.cjs');
|
|
29
29
|
require('jose/errors');
|
|
30
30
|
require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
31
31
|
require('defu');
|
|
32
|
+
require('../../shared/better-auth.uykCWCYS.cjs');
|
|
32
33
|
|
|
33
34
|
function _interopNamespaceCompat(e) {
|
|
34
35
|
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
@@ -68,8 +69,12 @@ const oAuthProxy = (opts) => {
|
|
|
68
69
|
{
|
|
69
70
|
method: "GET",
|
|
70
71
|
query: z__namespace.object({
|
|
71
|
-
callbackURL: z__namespace.string().
|
|
72
|
-
|
|
72
|
+
callbackURL: z__namespace.string().meta({
|
|
73
|
+
description: "The URL to redirect to after the proxy"
|
|
74
|
+
}),
|
|
75
|
+
cookies: z__namespace.string().meta({
|
|
76
|
+
description: "The cookies to set after the proxy"
|
|
77
|
+
})
|
|
73
78
|
}),
|
|
74
79
|
use: [socialProviders_index.originCheck((ctx) => ctx.query.callbackURL)],
|
|
75
80
|
metadata: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HookEndpointContext, d as AuthContext } from '../../shared/better-auth.
|
|
1
|
+
import { H as HookEndpointContext, d as AuthContext } from '../../shared/better-auth.BOKSn3AP.cjs';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
import 'kysely';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HookEndpointContext, d as AuthContext } from '../../shared/better-auth.
|
|
1
|
+
import { H as HookEndpointContext, d as AuthContext } from '../../shared/better-auth.vNMd9aBC.mjs';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
import 'kysely';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HookEndpointContext, d as AuthContext } from '../../shared/better-auth.
|
|
1
|
+
import { H as HookEndpointContext, d as AuthContext } from '../../shared/better-auth.3es9ZU_K.js';
|
|
2
2
|
import * as better_call from 'better-call';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
import 'kysely';
|