better-auth 1.2.4-beta.1 → 1.2.4-beta.12
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.cjs +6 -0
- 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/drizzle-adapter/index.mjs +7 -1
- 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 +3 -3
- 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 +4 -4
- package/dist/client/index.cjs +2 -2
- package/dist/client/index.d.cts +2 -2
- package/dist/client/index.d.mts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.mjs +2 -2
- package/dist/client/plugins/index.cjs +91 -101
- package/dist/client/plugins/index.d.cts +15 -236
- package/dist/client/plugins/index.d.mts +15 -236
- package/dist/client/plugins/index.d.ts +15 -236
- package/dist/client/plugins/index.mjs +92 -102
- package/dist/client/react/index.cjs +17 -13
- package/dist/client/react/index.d.cts +25 -2
- package/dist/client/react/index.d.mts +25 -2
- package/dist/client/react/index.d.ts +25 -2
- package/dist/client/react/index.mjs +17 -13
- package/dist/client/solid/index.cjs +2 -2
- package/dist/client/solid/index.d.cts +1 -1
- package/dist/client/solid/index.d.mts +1 -1
- package/dist/client/solid/index.d.ts +1 -1
- package/dist/client/solid/index.mjs +2 -2
- package/dist/client/svelte/index.cjs +2 -2
- package/dist/client/svelte/index.d.cts +1 -1
- package/dist/client/svelte/index.d.mts +1 -1
- package/dist/client/svelte/index.d.ts +1 -1
- package/dist/client/svelte/index.mjs +2 -2
- package/dist/client/vue/index.cjs +2 -2
- package/dist/client/vue/index.d.cts +1 -1
- package/dist/client/vue/index.d.mts +1 -1
- package/dist/client/vue/index.d.ts +1 -1
- package/dist/client/vue/index.mjs +2 -2
- package/dist/cookies/index.cjs +6 -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 +6 -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 +15 -11
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +16 -12
- package/dist/integrations/next-js.cjs +5 -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 +5 -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/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/oauth2/index.cjs +1 -1
- 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 +1 -1
- package/dist/plugins/admin/index.cjs +4 -4
- package/dist/plugins/admin/index.d.cts +1 -1
- package/dist/plugins/admin/index.d.mts +1 -1
- package/dist/plugins/admin/index.d.ts +1 -1
- package/dist/plugins/admin/index.mjs +4 -4
- package/dist/plugins/anonymous/index.cjs +3 -3
- 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 +3 -3
- package/dist/plugins/bearer/index.cjs +3 -3
- 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 +3 -3
- package/dist/plugins/custom-session/index.cjs +3 -3
- 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 +3 -3
- package/dist/plugins/email-otp/index.cjs +3 -3
- 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 +3 -3
- package/dist/plugins/generic-oauth/index.cjs +3 -3
- 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 +3 -3
- package/dist/plugins/index.cjs +15 -17
- package/dist/plugins/index.d.cts +3 -3
- package/dist/plugins/index.d.mts +3 -3
- package/dist/plugins/index.d.ts +3 -3
- package/dist/plugins/index.mjs +15 -17
- package/dist/plugins/jwt/index.cjs +8 -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 +8 -4
- package/dist/plugins/magic-link/index.cjs +3 -3
- package/dist/plugins/magic-link/index.mjs +3 -3
- package/dist/plugins/multi-session/index.cjs +14 -5
- 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 +14 -5
- package/dist/plugins/oauth-proxy/index.cjs +3 -3
- 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 +3 -3
- package/dist/plugins/oidc-provider/index.cjs +89 -17
- package/dist/plugins/oidc-provider/index.d.cts +110 -14
- package/dist/plugins/oidc-provider/index.d.mts +110 -14
- package/dist/plugins/oidc-provider/index.d.ts +110 -14
- package/dist/plugins/oidc-provider/index.mjs +89 -17
- package/dist/plugins/one-tap/index.cjs +3 -3
- package/dist/plugins/one-tap/index.mjs +3 -3
- package/dist/plugins/open-api/index.cjs +3 -3
- 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 +3 -3
- package/dist/plugins/organization/index.cjs +5 -5
- 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 +5 -5
- package/dist/plugins/passkey/index.cjs +3 -3
- 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 +3 -3
- package/dist/plugins/phone-number/index.cjs +19 -11
- package/dist/plugins/phone-number/index.d.cts +4 -3
- package/dist/plugins/phone-number/index.d.mts +4 -3
- package/dist/plugins/phone-number/index.d.ts +4 -3
- package/dist/plugins/phone-number/index.mjs +19 -11
- package/dist/plugins/sso/index.cjs +3 -3
- package/dist/plugins/sso/index.d.cts +1 -1
- package/dist/plugins/sso/index.d.mts +1 -1
- package/dist/plugins/sso/index.d.ts +1 -1
- package/dist/plugins/sso/index.mjs +3 -3
- package/dist/plugins/two-factor/index.cjs +7 -7
- 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 +7 -7
- package/dist/plugins/username/index.cjs +3 -3
- package/dist/plugins/username/index.d.cts +1 -1
- package/dist/plugins/username/index.d.mts +1 -1
- package/dist/plugins/username/index.d.ts +1 -1
- package/dist/plugins/username/index.mjs +3 -3
- package/dist/shared/{better-auth.B5NYxGA3.mjs → better-auth.67eSHmUo.mjs} +3 -7
- package/dist/shared/{better-auth.CMz4USTt.cjs → better-auth.B6Xcg5N5.cjs} +1 -1
- package/dist/shared/{better-auth.K251u4eV.mjs → better-auth.BH6IWaNB.mjs} +3 -3
- package/dist/shared/{better-auth.DNb3Aogp.cjs → better-auth.BN2jUYPL.cjs} +1 -1
- package/dist/shared/{better-auth.F2VsZ04W.d.ts → better-auth.BVojg4kv.d.ts} +1 -1
- package/dist/shared/{better-auth.BA2kubRc.d.cts → better-auth.BdjFNTuQ.d.cts} +1 -1
- package/dist/shared/{better-auth.D4ignKqt.d.mts → better-auth.BfPbu6oh.d.mts} +1 -1
- package/dist/shared/{better-auth.DhfiEsxl.cjs → better-auth.C-R0J0n1.cjs} +15 -1
- package/dist/shared/{better-auth.Bd1H94Nk.mjs → better-auth.CABkkSP8.mjs} +1 -1
- package/dist/shared/{better-auth.npe3WWSD.mjs → better-auth.CFZLHBFT.mjs} +23 -24
- package/dist/shared/{better-auth.GgQnT00n.cjs → better-auth.CHHC_PJT.cjs} +1 -0
- package/dist/shared/{better-auth.BI_ldOv7.mjs → better-auth.CHsl8t-G.mjs} +2 -7
- package/dist/shared/{better-auth.BAR_8WbD.d.cts → better-auth.CPKTEzG-.d.cts} +3 -2
- package/dist/shared/{better-auth.DXbPkpEx.cjs → better-auth.CR_ASYNx.cjs} +3 -3
- package/dist/shared/{better-auth.YSKz0i4l.mjs → better-auth.CSVqSIae.mjs} +1 -1
- package/dist/shared/{better-auth.Cx-TsLBb.d.mts → better-auth.CVOWGLfd.d.mts} +1 -1
- package/dist/shared/{better-auth.CoMXyQ1y.mjs → better-auth.CbXAPXob.mjs} +1 -0
- package/dist/shared/{better-auth.imLEY-xr.d.mts → better-auth.Ck0xlDsK.d.mts} +3 -2
- package/dist/shared/{better-auth.BS4hQYkx.d.cts → better-auth.Ckf_tP8g.d.mts} +1 -1
- package/dist/shared/{better-auth.CqfKuHli.mjs → better-auth.CmplT_y7.mjs} +11 -18
- package/dist/shared/{better-auth.BvJDkY_b.cjs → better-auth.Cr6NZZDX.cjs} +11 -18
- package/dist/shared/{better-auth.BLtLzuLI.d.cts → better-auth.DIRcdXVm.d.cts} +1 -1
- package/dist/shared/{better-auth.DayxQ0AW.d.ts → better-auth.DaeQzncE.d.ts} +1 -1
- package/dist/shared/{better-auth.CKg1f8vU.cjs → better-auth.DcpLarbN.cjs} +3 -7
- package/dist/shared/{better-auth.purQujiV.d.ts → better-auth.DiHCWsNg.d.ts} +3 -2
- package/dist/shared/{better-auth.CwDUoRLB.cjs → better-auth.Dxrp37xO.cjs} +2 -7
- package/dist/shared/{better-auth.BzKRBwSF.cjs → better-auth.GVCiTzec.cjs} +23 -24
- package/dist/shared/{better-auth.NcLhHEks.mjs → better-auth.VTXNLFMT.mjs} +15 -1
- package/dist/shared/{better-auth.BxdddeEs.d.mts → better-auth.Vci2tT86.d.cts} +1 -1
- package/dist/shared/{better-auth.977UjO4P.d.ts → better-auth.jVBEmAqh.d.ts} +1 -1
- package/dist/social-providers/index.cjs +3 -1
- package/dist/social-providers/index.mjs +3 -1
- package/dist/types/index.d.cts +4 -3
- package/dist/types/index.d.mts +4 -3
- package/dist/types/index.d.ts +4 -3
- package/package.json +3 -3
|
@@ -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.CFZLHBFT.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';
|
|
@@ -24,10 +24,10 @@ import '../../shared/better-auth.D7syfoJW.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';
|
|
27
|
-
import '../../shared/better-auth.
|
|
27
|
+
import '../../shared/better-auth.CbXAPXob.mjs';
|
|
28
28
|
import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
29
29
|
import '../../shared/better-auth.DDEbWX-S.mjs';
|
|
30
|
-
import '../../shared/better-auth.
|
|
30
|
+
import '../../shared/better-auth.VTXNLFMT.mjs';
|
|
31
31
|
import 'jose/errors';
|
|
32
32
|
import '../../shared/better-auth.tB5eU6EY.mjs';
|
|
33
33
|
import '@better-auth/utils/binary';
|
|
@@ -963,10 +963,33 @@ const oidcProvider = (options) => {
|
|
|
963
963
|
{
|
|
964
964
|
method: "POST",
|
|
965
965
|
body: z.object({
|
|
966
|
-
|
|
967
|
-
|
|
966
|
+
redirect_uris: z.array(z.string()),
|
|
967
|
+
token_endpoint_auth_method: z.enum(["none", "client_secret_basic", "client_secret_post"]).default("client_secret_basic").optional(),
|
|
968
|
+
grant_types: z.array(
|
|
969
|
+
z.enum([
|
|
970
|
+
"authorization_code",
|
|
971
|
+
"implicit",
|
|
972
|
+
"password",
|
|
973
|
+
"client_credentials",
|
|
974
|
+
"refresh_token",
|
|
975
|
+
"urn:ietf:params:oauth:grant-type:jwt-bearer",
|
|
976
|
+
"urn:ietf:params:oauth:grant-type:saml2-bearer"
|
|
977
|
+
])
|
|
978
|
+
).default(["authorization_code"]).optional(),
|
|
979
|
+
response_types: z.array(z.enum(["code", "token"])).default(["code"]).optional(),
|
|
980
|
+
client_name: z.string().optional(),
|
|
981
|
+
client_uri: z.string().optional(),
|
|
982
|
+
logo_uri: z.string().optional(),
|
|
983
|
+
scope: z.string().optional(),
|
|
984
|
+
contacts: z.array(z.string()).optional(),
|
|
985
|
+
tos_uri: z.string().optional(),
|
|
986
|
+
policy_uri: z.string().optional(),
|
|
987
|
+
jwks_uri: z.string().optional(),
|
|
988
|
+
jwks: z.record(z.any()).optional(),
|
|
968
989
|
metadata: z.record(z.any()).optional(),
|
|
969
|
-
|
|
990
|
+
software_id: z.string().optional(),
|
|
991
|
+
software_version: z.string().optional(),
|
|
992
|
+
software_statement: z.string().optional()
|
|
970
993
|
})
|
|
971
994
|
},
|
|
972
995
|
async (ctx) => {
|
|
@@ -974,33 +997,82 @@ const oidcProvider = (options) => {
|
|
|
974
997
|
const session = await getSessionFromCtx(ctx);
|
|
975
998
|
if (!session && !options.allowDynamicClientRegistration) {
|
|
976
999
|
throw new APIError("UNAUTHORIZED", {
|
|
977
|
-
|
|
1000
|
+
error: "invalid_token",
|
|
1001
|
+
error_description: "Authentication required for client registration"
|
|
978
1002
|
});
|
|
979
1003
|
}
|
|
1004
|
+
if ((!body.grant_types || body.grant_types.includes("authorization_code") || body.grant_types.includes("implicit")) && (!body.redirect_uris || body.redirect_uris.length === 0)) {
|
|
1005
|
+
throw new APIError("BAD_REQUEST", {
|
|
1006
|
+
error: "invalid_redirect_uri",
|
|
1007
|
+
error_description: "Redirect URIs are required for authorization_code and implicit grant types"
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
if (body.grant_types && body.response_types) {
|
|
1011
|
+
if (body.grant_types.includes("authorization_code") && !body.response_types.includes("code")) {
|
|
1012
|
+
throw new APIError("BAD_REQUEST", {
|
|
1013
|
+
error: "invalid_client_metadata",
|
|
1014
|
+
error_description: "When 'authorization_code' grant type is used, 'code' response type must be included"
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
1017
|
+
if (body.grant_types.includes("implicit") && !body.response_types.includes("token")) {
|
|
1018
|
+
throw new APIError("BAD_REQUEST", {
|
|
1019
|
+
error: "invalid_client_metadata",
|
|
1020
|
+
error_description: "When 'implicit' grant type is used, 'token' response type must be included"
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
980
1024
|
const clientId = options.generateClientId?.() || generateRandomString(32, "a-z", "A-Z");
|
|
981
1025
|
const clientSecret = options.generateClientSecret?.() || generateRandomString(32, "a-z", "A-Z");
|
|
982
|
-
|
|
1026
|
+
await ctx.context.adapter.create({
|
|
983
1027
|
model: modelName.oauthClient,
|
|
984
1028
|
data: {
|
|
985
|
-
name: body.
|
|
986
|
-
icon: body.
|
|
1029
|
+
name: body.client_name,
|
|
1030
|
+
icon: body.logo_uri,
|
|
987
1031
|
metadata: body.metadata ? JSON.stringify(body.metadata) : null,
|
|
988
1032
|
clientId,
|
|
989
1033
|
clientSecret,
|
|
990
|
-
redirectURLs: body.
|
|
1034
|
+
redirectURLs: body.redirect_uris.join(","),
|
|
991
1035
|
type: "web",
|
|
992
|
-
authenticationScheme: "
|
|
1036
|
+
authenticationScheme: body.token_endpoint_auth_method || "client_secret_basic",
|
|
993
1037
|
disabled: false,
|
|
994
1038
|
userId: session?.session.userId,
|
|
995
1039
|
createdAt: /* @__PURE__ */ new Date(),
|
|
996
1040
|
updatedAt: /* @__PURE__ */ new Date()
|
|
997
1041
|
}
|
|
998
1042
|
});
|
|
999
|
-
return ctx.json(
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1043
|
+
return ctx.json(
|
|
1044
|
+
{
|
|
1045
|
+
client_id: clientId,
|
|
1046
|
+
client_secret: clientSecret,
|
|
1047
|
+
client_id_issued_at: Math.floor(Date.now() / 1e3),
|
|
1048
|
+
client_secret_expires_at: 0,
|
|
1049
|
+
// 0 means it doesn't expire
|
|
1050
|
+
redirect_uris: body.redirect_uris,
|
|
1051
|
+
token_endpoint_auth_method: body.token_endpoint_auth_method || "client_secret_basic",
|
|
1052
|
+
grant_types: body.grant_types || ["authorization_code"],
|
|
1053
|
+
response_types: body.response_types || ["code"],
|
|
1054
|
+
client_name: body.client_name,
|
|
1055
|
+
client_uri: body.client_uri,
|
|
1056
|
+
logo_uri: body.logo_uri,
|
|
1057
|
+
scope: body.scope,
|
|
1058
|
+
contacts: body.contacts,
|
|
1059
|
+
tos_uri: body.tos_uri,
|
|
1060
|
+
policy_uri: body.policy_uri,
|
|
1061
|
+
jwks_uri: body.jwks_uri,
|
|
1062
|
+
jwks: body.jwks,
|
|
1063
|
+
software_id: body.software_id,
|
|
1064
|
+
software_version: body.software_version,
|
|
1065
|
+
software_statement: body.software_statement,
|
|
1066
|
+
metadata: body.metadata
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
status: 201,
|
|
1070
|
+
headers: {
|
|
1071
|
+
"Cache-Control": "no-store",
|
|
1072
|
+
Pragma: "no-cache"
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
);
|
|
1004
1076
|
}
|
|
1005
1077
|
),
|
|
1006
1078
|
getOAuthClient: createAuthEndpoint(
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
|
-
const account = require('../../shared/better-auth.
|
|
5
|
+
const account = require('../../shared/better-auth.GVCiTzec.cjs');
|
|
6
6
|
const cookies_index = require('../../cookies/index.cjs');
|
|
7
7
|
require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
8
8
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
@@ -25,11 +25,11 @@ require('@noble/hashes/utils');
|
|
|
25
25
|
require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
26
26
|
require('@better-auth/utils/random');
|
|
27
27
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
28
|
-
require('../../shared/better-auth.
|
|
28
|
+
require('../../shared/better-auth.CHHC_PJT.cjs');
|
|
29
29
|
require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
30
30
|
require('@better-auth/utils/hmac');
|
|
31
31
|
require('../../shared/better-auth.BMYo0QR-.cjs');
|
|
32
|
-
require('../../shared/better-auth.
|
|
32
|
+
require('../../shared/better-auth.C-R0J0n1.cjs');
|
|
33
33
|
require('jose/errors');
|
|
34
34
|
require('../../shared/better-auth.D3mtHEZg.cjs');
|
|
35
35
|
require('@better-auth/utils/binary');
|
|
@@ -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.CFZLHBFT.mjs';
|
|
4
4
|
import { setSessionCookie } from '../../cookies/index.mjs';
|
|
5
5
|
import '../../shared/better-auth.C24Bzw4w.mjs';
|
|
6
6
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
@@ -23,11 +23,11 @@ import '@noble/hashes/utils';
|
|
|
23
23
|
import '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
24
24
|
import '@better-auth/utils/random';
|
|
25
25
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
26
|
-
import '../../shared/better-auth.
|
|
26
|
+
import '../../shared/better-auth.CbXAPXob.mjs';
|
|
27
27
|
import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
28
28
|
import '@better-auth/utils/hmac';
|
|
29
29
|
import '../../shared/better-auth.DDEbWX-S.mjs';
|
|
30
|
-
import '../../shared/better-auth.
|
|
30
|
+
import '../../shared/better-auth.VTXNLFMT.mjs';
|
|
31
31
|
import 'jose/errors';
|
|
32
32
|
import '../../shared/better-auth.tB5eU6EY.mjs';
|
|
33
33
|
import '@better-auth/utils/binary';
|
|
@@ -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 account = require('../../shared/better-auth.
|
|
23
|
+
const account = require('../../shared/better-auth.GVCiTzec.cjs');
|
|
24
24
|
require('@better-auth/utils/hmac');
|
|
25
25
|
require('defu');
|
|
26
26
|
require('../../cookies/index.cjs');
|
|
@@ -31,10 +31,10 @@ require('../../shared/better-auth.BgkOX1Ei.cjs');
|
|
|
31
31
|
require('../../social-providers/index.cjs');
|
|
32
32
|
require('@better-fetch/fetch');
|
|
33
33
|
require('../../shared/better-auth.DdjqxOIu.cjs');
|
|
34
|
-
require('../../shared/better-auth.
|
|
34
|
+
require('../../shared/better-auth.CHHC_PJT.cjs');
|
|
35
35
|
require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
36
36
|
require('../../shared/better-auth.BMYo0QR-.cjs');
|
|
37
|
-
require('../../shared/better-auth.
|
|
37
|
+
require('../../shared/better-auth.C-R0J0n1.cjs');
|
|
38
38
|
require('jose/errors');
|
|
39
39
|
require('@better-auth/utils/binary');
|
|
40
40
|
|
|
@@ -1,6 +1,6 @@
|
|
|
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.CPKTEzG-.cjs';
|
|
4
4
|
import { L as LiteralString } from '../../shared/better-auth.Bi8FQwDD.cjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'kysely';
|
|
@@ -1,6 +1,6 @@
|
|
|
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.Ck0xlDsK.mjs';
|
|
4
4
|
import { L as LiteralString } from '../../shared/better-auth.Bi8FQwDD.mjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'kysely';
|
|
@@ -1,6 +1,6 @@
|
|
|
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.DiHCWsNg.js';
|
|
4
4
|
import { L as LiteralString } from '../../shared/better-auth.Bi8FQwDD.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'kysely';
|
|
@@ -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.CFZLHBFT.mjs';
|
|
22
22
|
import '@better-auth/utils/hmac';
|
|
23
23
|
import 'defu';
|
|
24
24
|
import '../../cookies/index.mjs';
|
|
@@ -29,10 +29,10 @@ import '../../shared/better-auth.Duk7IG0N.mjs';
|
|
|
29
29
|
import '../../social-providers/index.mjs';
|
|
30
30
|
import '@better-fetch/fetch';
|
|
31
31
|
import '../../shared/better-auth.D7syfoJW.mjs';
|
|
32
|
-
import '../../shared/better-auth.
|
|
32
|
+
import '../../shared/better-auth.CbXAPXob.mjs';
|
|
33
33
|
import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
34
34
|
import '../../shared/better-auth.DDEbWX-S.mjs';
|
|
35
|
-
import '../../shared/better-auth.
|
|
35
|
+
import '../../shared/better-auth.VTXNLFMT.mjs';
|
|
36
36
|
import 'jose/errors';
|
|
37
37
|
import '@better-auth/utils/binary';
|
|
38
38
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const organization = require('../../shared/better-auth.
|
|
3
|
+
const organization = require('../../shared/better-auth.Dxrp37xO.cjs');
|
|
4
4
|
require('better-call');
|
|
5
5
|
require('zod');
|
|
6
|
-
require('../../shared/better-auth.
|
|
6
|
+
require('../../shared/better-auth.GVCiTzec.cjs');
|
|
7
7
|
require('../../cookies/index.cjs');
|
|
8
8
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
9
9
|
require('../../shared/better-auth.C1hdVENX.cjs');
|
|
@@ -26,15 +26,15 @@ require('@noble/hashes/utils');
|
|
|
26
26
|
require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
27
27
|
require('@better-auth/utils/random');
|
|
28
28
|
require('../../shared/better-auth.GpOOav9x.cjs');
|
|
29
|
-
require('../../shared/better-auth.
|
|
29
|
+
require('../../shared/better-auth.CHHC_PJT.cjs');
|
|
30
30
|
require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
31
31
|
require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
32
32
|
require('defu');
|
|
33
33
|
require('../../shared/better-auth.BMYo0QR-.cjs');
|
|
34
|
-
require('../../shared/better-auth.
|
|
34
|
+
require('../../shared/better-auth.C-R0J0n1.cjs');
|
|
35
35
|
require('jose/errors');
|
|
36
36
|
require('@better-auth/utils/binary');
|
|
37
|
-
require('../../shared/better-auth.
|
|
37
|
+
require('../../shared/better-auth.Cr6NZZDX.cjs');
|
|
38
38
|
require('../../shared/better-auth.DhsGZ30Q.cjs');
|
|
39
39
|
require('./access/index.cjs');
|
|
40
40
|
require('../access/index.cjs');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { O as OrganizationOptions, o as organization } from '../../shared/better-auth.
|
|
1
|
+
export { O as OrganizationOptions, o as organization } from '../../shared/better-auth.DIRcdXVm.cjs';
|
|
2
2
|
import '../access/index.cjs';
|
|
3
3
|
import '../../shared/better-auth.Bi8FQwDD.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'better-call';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.CPKTEzG-.cjs';
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import '../../shared/better-auth.GFrhA2ZN.cjs';
|
|
9
9
|
import 'jose';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { O as OrganizationOptions, o as organization } from '../../shared/better-auth.
|
|
1
|
+
export { O as OrganizationOptions, o as organization } from '../../shared/better-auth.BfPbu6oh.mjs';
|
|
2
2
|
import '../access/index.mjs';
|
|
3
3
|
import '../../shared/better-auth.Bi8FQwDD.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'better-call';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.Ck0xlDsK.mjs';
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import '../../shared/better-auth.Dzvtygs8.mjs';
|
|
9
9
|
import 'jose';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { O as OrganizationOptions, o as organization } from '../../shared/better-auth.
|
|
1
|
+
export { O as OrganizationOptions, o as organization } from '../../shared/better-auth.jVBEmAqh.js';
|
|
2
2
|
import '../access/index.js';
|
|
3
3
|
import '../../shared/better-auth.Bi8FQwDD.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'better-call';
|
|
6
|
-
import '../../shared/better-auth.
|
|
6
|
+
import '../../shared/better-auth.DiHCWsNg.js';
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import '../../shared/better-auth.BRpbZ8Wm.js';
|
|
9
9
|
import 'jose';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { o as organization } from '../../shared/better-auth.
|
|
1
|
+
export { o as organization } from '../../shared/better-auth.CHsl8t-G.mjs';
|
|
2
2
|
import 'better-call';
|
|
3
3
|
import 'zod';
|
|
4
|
-
import '../../shared/better-auth.
|
|
4
|
+
import '../../shared/better-auth.CFZLHBFT.mjs';
|
|
5
5
|
import '../../cookies/index.mjs';
|
|
6
6
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
7
7
|
import '../../shared/better-auth.CW6D9eSx.mjs';
|
|
@@ -24,15 +24,15 @@ import '@noble/hashes/utils';
|
|
|
24
24
|
import '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
25
25
|
import '@better-auth/utils/random';
|
|
26
26
|
import '../../shared/better-auth.DH3YjMQH.mjs';
|
|
27
|
-
import '../../shared/better-auth.
|
|
27
|
+
import '../../shared/better-auth.CbXAPXob.mjs';
|
|
28
28
|
import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
29
29
|
import '../../shared/better-auth.C24Bzw4w.mjs';
|
|
30
30
|
import 'defu';
|
|
31
31
|
import '../../shared/better-auth.DDEbWX-S.mjs';
|
|
32
|
-
import '../../shared/better-auth.
|
|
32
|
+
import '../../shared/better-auth.VTXNLFMT.mjs';
|
|
33
33
|
import 'jose/errors';
|
|
34
34
|
import '@better-auth/utils/binary';
|
|
35
|
-
import '../../shared/better-auth.
|
|
35
|
+
import '../../shared/better-auth.CmplT_y7.mjs';
|
|
36
36
|
import '../../shared/better-auth.ffWeg50w.mjs';
|
|
37
37
|
import './access/index.mjs';
|
|
38
38
|
import '../access/index.mjs';
|
|
@@ -4,7 +4,7 @@ const server = require('@simplewebauthn/server');
|
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
5
|
const random = require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
6
6
|
const zod = require('zod');
|
|
7
|
-
const account = require('../../shared/better-auth.
|
|
7
|
+
const account = require('../../shared/better-auth.GVCiTzec.cjs');
|
|
8
8
|
const cookies_index = require('../../cookies/index.cjs');
|
|
9
9
|
const schema$1 = require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
10
10
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
@@ -27,10 +27,10 @@ require('@better-fetch/fetch');
|
|
|
27
27
|
require('../../shared/better-auth.DdjqxOIu.cjs');
|
|
28
28
|
require('../../shared/better-auth.C1hdVENX.cjs');
|
|
29
29
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
30
|
-
require('../../shared/better-auth.
|
|
30
|
+
require('../../shared/better-auth.CHHC_PJT.cjs');
|
|
31
31
|
require('@better-auth/utils/hmac');
|
|
32
32
|
require('../../shared/better-auth.BMYo0QR-.cjs');
|
|
33
|
-
require('../../shared/better-auth.
|
|
33
|
+
require('../../shared/better-auth.C-R0J0n1.cjs');
|
|
34
34
|
require('jose/errors');
|
|
35
35
|
require('../../shared/better-auth.D3mtHEZg.cjs');
|
|
36
36
|
require('@better-auth/utils/binary');
|
|
@@ -2,7 +2,7 @@ import * as _simplewebauthn_server from '@simplewebauthn/server';
|
|
|
2
2
|
import { CredentialDeviceType, PublicKeyCredentialCreationOptionsJSON, AuthenticationResponseJSON } from '@simplewebauthn/server';
|
|
3
3
|
import * as better_call from 'better-call';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { I as InferOptionSchema } from '../../shared/better-auth.
|
|
5
|
+
import { I as InferOptionSchema } from '../../shared/better-auth.CPKTEzG-.cjs';
|
|
6
6
|
import '../../shared/better-auth.Bi8FQwDD.cjs';
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import '../../shared/better-auth.GFrhA2ZN.cjs';
|
|
@@ -2,7 +2,7 @@ import * as _simplewebauthn_server from '@simplewebauthn/server';
|
|
|
2
2
|
import { CredentialDeviceType, PublicKeyCredentialCreationOptionsJSON, AuthenticationResponseJSON } from '@simplewebauthn/server';
|
|
3
3
|
import * as better_call from 'better-call';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { I as InferOptionSchema } from '../../shared/better-auth.
|
|
5
|
+
import { I as InferOptionSchema } from '../../shared/better-auth.Ck0xlDsK.mjs';
|
|
6
6
|
import '../../shared/better-auth.Bi8FQwDD.mjs';
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import '../../shared/better-auth.Dzvtygs8.mjs';
|
|
@@ -2,7 +2,7 @@ import * as _simplewebauthn_server from '@simplewebauthn/server';
|
|
|
2
2
|
import { CredentialDeviceType, PublicKeyCredentialCreationOptionsJSON, AuthenticationResponseJSON } from '@simplewebauthn/server';
|
|
3
3
|
import * as better_call from 'better-call';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { I as InferOptionSchema } from '../../shared/better-auth.
|
|
5
|
+
import { I as InferOptionSchema } from '../../shared/better-auth.DiHCWsNg.js';
|
|
6
6
|
import '../../shared/better-auth.Bi8FQwDD.js';
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import '../../shared/better-auth.BRpbZ8Wm.js';
|
|
@@ -2,7 +2,7 @@ import { verifyAuthenticationResponse, verifyRegistrationResponse, generateAuthe
|
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
3
|
import { g as generateRandomString } from '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { a as createAuthEndpoint, s as sessionMiddleware, f as freshSessionMiddleware, g as getSessionFromCtx } from '../../shared/better-auth.
|
|
5
|
+
import { a as createAuthEndpoint, s as sessionMiddleware, f as freshSessionMiddleware, g as getSessionFromCtx } from '../../shared/better-auth.CFZLHBFT.mjs';
|
|
6
6
|
import { setSessionCookie } from '../../cookies/index.mjs';
|
|
7
7
|
import { m as mergeSchema } from '../../shared/better-auth.C24Bzw4w.mjs';
|
|
8
8
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
@@ -25,10 +25,10 @@ import '@better-fetch/fetch';
|
|
|
25
25
|
import '../../shared/better-auth.D7syfoJW.mjs';
|
|
26
26
|
import '../../shared/better-auth.CW6D9eSx.mjs';
|
|
27
27
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
28
|
-
import '../../shared/better-auth.
|
|
28
|
+
import '../../shared/better-auth.CbXAPXob.mjs';
|
|
29
29
|
import '@better-auth/utils/hmac';
|
|
30
30
|
import '../../shared/better-auth.DDEbWX-S.mjs';
|
|
31
|
-
import '../../shared/better-auth.
|
|
31
|
+
import '../../shared/better-auth.VTXNLFMT.mjs';
|
|
32
32
|
import 'jose/errors';
|
|
33
33
|
import '../../shared/better-auth.tB5eU6EY.mjs';
|
|
34
34
|
import '@better-auth/utils/binary';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
|
-
const account = require('../../shared/better-auth.
|
|
4
|
+
const account = require('../../shared/better-auth.GVCiTzec.cjs');
|
|
5
5
|
const betterCall = require('better-call');
|
|
6
6
|
const schema$1 = require('../../shared/better-auth.CHyZMcYK.cjs');
|
|
7
7
|
const random = require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
@@ -25,11 +25,11 @@ require('@better-auth/utils/hex');
|
|
|
25
25
|
require('@noble/hashes/utils');
|
|
26
26
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
27
27
|
require('@better-auth/utils/random');
|
|
28
|
-
require('../../shared/better-auth.
|
|
28
|
+
require('../../shared/better-auth.CHHC_PJT.cjs');
|
|
29
29
|
require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
30
30
|
require('@better-auth/utils/hmac');
|
|
31
31
|
require('../../shared/better-auth.BMYo0QR-.cjs');
|
|
32
|
-
require('../../shared/better-auth.
|
|
32
|
+
require('../../shared/better-auth.C-R0J0n1.cjs');
|
|
33
33
|
require('jose/errors');
|
|
34
34
|
require('../../shared/better-auth.D3mtHEZg.cjs');
|
|
35
35
|
require('@better-auth/utils/binary');
|
|
@@ -49,6 +49,7 @@ const phoneNumber = (options) => {
|
|
|
49
49
|
};
|
|
50
50
|
const ERROR_CODES = {
|
|
51
51
|
INVALID_PHONE_NUMBER: "Invalid phone number",
|
|
52
|
+
PHONE_NUMBER_EXIST: "Phone number already exist",
|
|
52
53
|
INVALID_PHONE_NUMBER_OR_PASSWORD: "Invalid phone number or password",
|
|
53
54
|
UNEXPECTED_ERROR: "Unexpected error",
|
|
54
55
|
OTP_NOT_FOUND: "OTP not found",
|
|
@@ -256,14 +257,7 @@ const phoneNumber = (options) => {
|
|
|
256
257
|
},
|
|
257
258
|
ctx.request
|
|
258
259
|
);
|
|
259
|
-
return ctx.json(
|
|
260
|
-
{ code },
|
|
261
|
-
{
|
|
262
|
-
body: {
|
|
263
|
-
message: "Code sent"
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
);
|
|
260
|
+
return ctx.json({ message: "code sent" });
|
|
267
261
|
}
|
|
268
262
|
),
|
|
269
263
|
verifyPhoneNumber: account.createAuthEndpoint(
|
|
@@ -356,6 +350,20 @@ const phoneNumber = (options) => {
|
|
|
356
350
|
message: account.BASE_ERROR_CODES.USER_NOT_FOUND
|
|
357
351
|
});
|
|
358
352
|
}
|
|
353
|
+
const existingUser = await ctx.context.adapter.findMany({
|
|
354
|
+
model: "user",
|
|
355
|
+
where: [
|
|
356
|
+
{
|
|
357
|
+
field: "phoneNumber",
|
|
358
|
+
value: ctx.body.phoneNumber
|
|
359
|
+
}
|
|
360
|
+
]
|
|
361
|
+
});
|
|
362
|
+
if (existingUser.length) {
|
|
363
|
+
throw ctx.error("BAD_REQUEST", {
|
|
364
|
+
message: ERROR_CODES.PHONE_NUMBER_EXIST
|
|
365
|
+
});
|
|
366
|
+
}
|
|
359
367
|
let user2 = await ctx.context.internalAdapter.updateUser(
|
|
360
368
|
session.user.id,
|
|
361
369
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { U as User, I as InferOptionSchema } from '../../shared/better-auth.
|
|
3
|
+
import { U as User, I as InferOptionSchema } from '../../shared/better-auth.CPKTEzG-.cjs';
|
|
4
4
|
import '../../shared/better-auth.Bi8FQwDD.cjs';
|
|
5
5
|
import 'kysely';
|
|
6
6
|
import '../../shared/better-auth.GFrhA2ZN.cjs';
|
|
@@ -193,10 +193,10 @@ declare const phoneNumber: (options?: PhoneNumberOptions) => {
|
|
|
193
193
|
}] ? {
|
|
194
194
|
headers: Headers;
|
|
195
195
|
response: {
|
|
196
|
-
|
|
196
|
+
message: string;
|
|
197
197
|
};
|
|
198
198
|
} : {
|
|
199
|
-
|
|
199
|
+
message: string;
|
|
200
200
|
}>;
|
|
201
201
|
options: {
|
|
202
202
|
method: "POST";
|
|
@@ -453,6 +453,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions) => {
|
|
|
453
453
|
};
|
|
454
454
|
$ERROR_CODES: {
|
|
455
455
|
readonly INVALID_PHONE_NUMBER: "Invalid phone number";
|
|
456
|
+
readonly PHONE_NUMBER_EXIST: "Phone number already exist";
|
|
456
457
|
readonly INVALID_PHONE_NUMBER_OR_PASSWORD: "Invalid phone number or password";
|
|
457
458
|
readonly UNEXPECTED_ERROR: "Unexpected error";
|
|
458
459
|
readonly OTP_NOT_FOUND: "OTP not found";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { U as User, I as InferOptionSchema } from '../../shared/better-auth.
|
|
3
|
+
import { U as User, I as InferOptionSchema } from '../../shared/better-auth.Ck0xlDsK.mjs';
|
|
4
4
|
import '../../shared/better-auth.Bi8FQwDD.mjs';
|
|
5
5
|
import 'kysely';
|
|
6
6
|
import '../../shared/better-auth.Dzvtygs8.mjs';
|
|
@@ -193,10 +193,10 @@ declare const phoneNumber: (options?: PhoneNumberOptions) => {
|
|
|
193
193
|
}] ? {
|
|
194
194
|
headers: Headers;
|
|
195
195
|
response: {
|
|
196
|
-
|
|
196
|
+
message: string;
|
|
197
197
|
};
|
|
198
198
|
} : {
|
|
199
|
-
|
|
199
|
+
message: string;
|
|
200
200
|
}>;
|
|
201
201
|
options: {
|
|
202
202
|
method: "POST";
|
|
@@ -453,6 +453,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions) => {
|
|
|
453
453
|
};
|
|
454
454
|
$ERROR_CODES: {
|
|
455
455
|
readonly INVALID_PHONE_NUMBER: "Invalid phone number";
|
|
456
|
+
readonly PHONE_NUMBER_EXIST: "Phone number already exist";
|
|
456
457
|
readonly INVALID_PHONE_NUMBER_OR_PASSWORD: "Invalid phone number or password";
|
|
457
458
|
readonly UNEXPECTED_ERROR: "Unexpected error";
|
|
458
459
|
readonly OTP_NOT_FOUND: "OTP not found";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { U as User, I as InferOptionSchema } from '../../shared/better-auth.
|
|
3
|
+
import { U as User, I as InferOptionSchema } from '../../shared/better-auth.DiHCWsNg.js';
|
|
4
4
|
import '../../shared/better-auth.Bi8FQwDD.js';
|
|
5
5
|
import 'kysely';
|
|
6
6
|
import '../../shared/better-auth.BRpbZ8Wm.js';
|
|
@@ -193,10 +193,10 @@ declare const phoneNumber: (options?: PhoneNumberOptions) => {
|
|
|
193
193
|
}] ? {
|
|
194
194
|
headers: Headers;
|
|
195
195
|
response: {
|
|
196
|
-
|
|
196
|
+
message: string;
|
|
197
197
|
};
|
|
198
198
|
} : {
|
|
199
|
-
|
|
199
|
+
message: string;
|
|
200
200
|
}>;
|
|
201
201
|
options: {
|
|
202
202
|
method: "POST";
|
|
@@ -453,6 +453,7 @@ declare const phoneNumber: (options?: PhoneNumberOptions) => {
|
|
|
453
453
|
};
|
|
454
454
|
$ERROR_CODES: {
|
|
455
455
|
readonly INVALID_PHONE_NUMBER: "Invalid phone number";
|
|
456
|
+
readonly PHONE_NUMBER_EXIST: "Phone number already exist";
|
|
456
457
|
readonly INVALID_PHONE_NUMBER_OR_PASSWORD: "Invalid phone number or password";
|
|
457
458
|
readonly UNEXPECTED_ERROR: "Unexpected error";
|
|
458
459
|
readonly OTP_NOT_FOUND: "OTP not found";
|