better-auth 1.6.26 → 1.6.28
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/index.d.mts +6 -1
- package/dist/api/dispatch.d.mts +1 -0
- package/dist/api/index.d.mts +508 -505
- package/dist/api/middlewares/authorization.d.mts +10 -14
- package/dist/api/middlewares/authorization.mjs +1 -2
- package/dist/api/middlewares/index.d.mts +1 -2
- package/dist/api/middlewares/origin-check.d.mts +5 -3
- package/dist/api/routes/account.d.mts +16 -13
- package/dist/api/routes/callback.d.mts +3 -1
- package/dist/api/routes/email-verification.d.mts +8 -4
- package/dist/api/routes/error.d.mts +3 -1
- package/dist/api/routes/index.d.mts +1 -2
- package/dist/api/routes/ok.d.mts +3 -1
- package/dist/api/routes/password.d.mts +10 -8
- package/dist/api/routes/session.d.mts +32 -30
- package/dist/api/routes/session.mjs +2 -3
- package/dist/api/routes/sign-in.d.mts +5 -3
- package/dist/api/routes/sign-out.d.mts +3 -1
- package/dist/api/routes/sign-up.d.mts +4 -3
- package/dist/api/routes/update-session.d.mts +5 -4
- package/dist/api/routes/update-user.d.mts +19 -18
- package/dist/auth/full.d.mts +1 -1
- package/dist/auth/minimal.d.mts +1 -1
- package/dist/client/config.d.mts +14 -12
- package/dist/client/config.mjs +2 -2
- package/dist/client/equality.d.mts +1 -0
- package/dist/client/index.d.mts +5 -6
- package/dist/client/lynx/index.d.mts +5 -4
- package/dist/client/lynx/lynx-store.d.mts +2 -1
- package/dist/client/parser.d.mts +3 -7
- package/dist/client/path-to-object.d.mts +4 -3
- package/dist/client/plugins/index.d.mts +1 -1
- package/dist/client/plugins/infer-plugin.d.mts +1 -0
- package/dist/client/query.d.mts +1 -0
- package/dist/client/react/index.d.mts +5 -4
- package/dist/client/react/react-store.d.mts +2 -1
- package/dist/client/session-atom.mjs +59 -46
- package/dist/client/session-refresh.d.mts +1 -0
- package/dist/client/solid/index.d.mts +5 -4
- package/dist/client/svelte/index.d.mts +5 -4
- package/dist/client/types.d.mts +2 -2
- package/dist/client/vanilla.d.mts +2 -1
- package/dist/client/vue/index.d.mts +5 -4
- package/dist/context/create-context.mjs +3 -3
- package/dist/context/helpers.mjs +2 -2
- package/dist/cookies/index.d.mts +7 -6
- package/dist/cookies/session-store.d.mts +0 -1
- package/dist/cookies/session-store.mjs +1 -2
- package/dist/crypto/index.d.mts +9 -2
- package/dist/crypto/jwt.d.mts +1 -0
- package/dist/crypto/password.d.mts +5 -1
- package/dist/db/adapter-base.d.mts +1 -0
- package/dist/db/adapter-kysely.d.mts +1 -0
- package/dist/db/field-converter.d.mts +1 -0
- package/dist/db/field.d.mts +10 -9
- package/dist/db/get-migration.d.mts +1 -0
- package/dist/db/get-schema.d.mts +1 -0
- package/dist/db/internal-adapter.d.mts +1 -0
- package/dist/db/internal-adapter.mjs +1 -2
- package/dist/db/revoke-unproven-account-access.d.mts +1 -0
- package/dist/db/schema.d.mts +2 -2
- package/dist/db/to-zod.d.mts +7 -3
- package/dist/db/with-hooks.d.mts +1 -0
- package/dist/index.d.mts +3 -4
- package/dist/integrations/next-js.d.mts +7 -4
- package/dist/integrations/node.d.mts +3 -2
- package/dist/integrations/svelte-kit.d.mts +9 -2
- package/dist/integrations/tanstack-start-solid.d.mts +5 -2
- package/dist/integrations/tanstack-start.d.mts +5 -2
- package/dist/oauth2/link-account.d.mts +1 -1
- package/dist/oauth2/state.d.mts +1 -0
- package/dist/oauth2/utils.d.mts +1 -0
- package/dist/package.mjs +1 -1
- package/dist/plugins/access/access.d.mts +1 -0
- package/dist/plugins/access/types.d.mts +5 -4
- package/dist/plugins/additional-fields/client.d.mts +1 -0
- package/dist/plugins/admin/access/statement.d.mts +0 -1
- package/dist/plugins/admin/admin.d.mts +137 -132
- package/dist/plugins/admin/client.d.mts +30 -30
- package/dist/plugins/admin/client.mjs +1 -1
- package/dist/plugins/admin/error-codes.d.mts +25 -23
- package/dist/plugins/admin/index.d.mts +1 -1
- package/dist/plugins/admin/schema.d.mts +1 -1
- package/dist/plugins/admin/types.d.mts +2 -3
- package/dist/plugins/anonymous/client.d.mts +11 -9
- package/dist/plugins/anonymous/client.mjs +1 -1
- package/dist/plugins/anonymous/error-codes.d.mts +10 -8
- package/dist/plugins/anonymous/index.d.mts +19 -15
- package/dist/plugins/anonymous/types.d.mts +1 -1
- package/dist/plugins/bearer/index.d.mts +8 -5
- package/dist/plugins/captcha/index.d.mts +8 -5
- package/dist/plugins/captcha/types.d.mts +1 -0
- package/dist/plugins/custom-session/client.d.mts +1 -0
- package/dist/plugins/custom-session/index.d.mts +12 -7
- package/dist/plugins/device-authorization/client.d.mts +1 -0
- package/dist/plugins/device-authorization/index.d.mts +22 -19
- package/dist/plugins/email-otp/client.d.mts +6 -4
- package/dist/plugins/email-otp/client.mjs +1 -1
- package/dist/plugins/email-otp/error-codes.d.mts +5 -3
- package/dist/plugins/email-otp/index.d.mts +76 -69
- package/dist/plugins/email-otp/types.d.mts +1 -0
- package/dist/plugins/generic-oauth/client.d.mts +11 -10
- package/dist/plugins/generic-oauth/client.mjs +1 -1
- package/dist/plugins/generic-oauth/error-codes.d.mts +10 -8
- package/dist/plugins/generic-oauth/index.d.mts +45 -41
- package/dist/plugins/generic-oauth/providers/auth0.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/gumroad.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/hubspot.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/index.d.mts +1 -2
- package/dist/plugins/generic-oauth/providers/keycloak.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/line.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/microsoft-entra-id.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/okta.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/patreon.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/slack.d.mts +1 -0
- package/dist/plugins/generic-oauth/providers/yandex.d.mts +1 -0
- package/dist/plugins/generic-oauth/types.d.mts +2 -1
- package/dist/plugins/haveibeenpwned/index.d.mts +6 -3
- package/dist/plugins/index.d.mts +1 -4
- package/dist/plugins/jwt/client.d.mts +2 -1
- package/dist/plugins/jwt/index.d.mts +12 -9
- package/dist/plugins/jwt/sign.d.mts +2 -2
- package/dist/plugins/jwt/types.d.mts +1 -1
- package/dist/plugins/jwt/utils.d.mts +4 -2
- package/dist/plugins/jwt/verify.d.mts +1 -0
- package/dist/plugins/last-login-method/index.d.mts +6 -3
- package/dist/plugins/magic-link/client.d.mts +1 -0
- package/dist/plugins/magic-link/index.d.mts +6 -4
- package/dist/plugins/mcp/client/adapters.d.mts +1 -0
- package/dist/plugins/mcp/client/index.mjs +2 -4
- package/dist/plugins/mcp/index.d.mts +12 -11
- package/dist/plugins/multi-session/client.d.mts +4 -2
- package/dist/plugins/multi-session/client.mjs +1 -1
- package/dist/plugins/multi-session/error-codes.d.mts +3 -1
- package/dist/plugins/multi-session/index.d.mts +12 -8
- package/dist/plugins/oauth-popup/client.d.mts +12 -6
- package/dist/plugins/oauth-popup/client.mjs +3 -5
- package/dist/plugins/oauth-popup/error-codes.d.mts +6 -4
- package/dist/plugins/oauth-popup/index.d.mts +12 -8
- package/dist/plugins/oauth-popup/index.mjs +1 -1
- package/dist/plugins/oauth-popup/types.d.mts +2 -1
- package/dist/plugins/oauth-proxy/index.d.mts +9 -6
- package/dist/plugins/oauth-proxy/index.mjs +2 -2
- package/dist/plugins/oidc-provider/client.d.mts +2 -1
- package/dist/plugins/oidc-provider/index.d.mts +20 -18
- package/dist/plugins/oidc-provider/schema.d.mts +1 -0
- package/dist/plugins/oidc-provider/types.d.mts +1 -1
- package/dist/plugins/one-tap/client.d.mts +3 -1
- package/dist/plugins/one-tap/index.d.mts +3 -1
- package/dist/plugins/one-time-token/client.d.mts +2 -1
- package/dist/plugins/one-time-token/index.d.mts +7 -6
- package/dist/plugins/open-api/generator.d.mts +1 -0
- package/dist/plugins/open-api/generator.mjs +5 -5
- package/dist/plugins/open-api/index.d.mts +5 -3
- package/dist/plugins/organization/access/statement.d.mts +0 -1
- package/dist/plugins/organization/adapter.d.mts +82 -56
- package/dist/plugins/organization/client.d.mts +103 -104
- package/dist/plugins/organization/client.mjs +4 -7
- package/dist/plugins/organization/error-codes.d.mts +61 -59
- package/dist/plugins/organization/has-permission.d.mts +1 -0
- package/dist/plugins/organization/has-permission.mjs +1 -1
- package/dist/plugins/organization/index.d.mts +1 -1
- package/dist/plugins/organization/organization.d.mts +33 -9
- package/dist/plugins/organization/organization.mjs +1 -1
- package/dist/plugins/organization/permission.d.mts +2 -2
- package/dist/plugins/organization/routes/crud-access-control.d.mts +147 -27
- package/dist/plugins/organization/routes/crud-invites.d.mts +186 -65
- package/dist/plugins/organization/routes/crud-invites.mjs +1 -1
- package/dist/plugins/organization/routes/crud-members.d.mts +178 -56
- package/dist/plugins/organization/routes/crud-members.mjs +1 -1
- package/dist/plugins/organization/routes/crud-org.d.mts +130 -57
- package/dist/plugins/organization/routes/crud-team.d.mts +235 -66
- package/dist/plugins/organization/schema.d.mts +4 -4
- package/dist/plugins/organization/schema.mjs +1 -1
- package/dist/plugins/organization/types.d.mts +14 -14
- package/dist/plugins/phone-number/client.d.mts +15 -13
- package/dist/plugins/phone-number/client.mjs +1 -1
- package/dist/plugins/phone-number/error-codes.d.mts +14 -12
- package/dist/plugins/phone-number/index.d.mts +47 -41
- package/dist/plugins/phone-number/types.d.mts +1 -1
- package/dist/plugins/siwe/client.d.mts +1 -0
- package/dist/plugins/siwe/index.d.mts +5 -4
- package/dist/plugins/test-utils/index.d.mts +4 -2
- package/dist/plugins/test-utils/types.d.mts +0 -1
- package/dist/plugins/two-factor/backup-codes/index.d.mts +7 -5
- package/dist/plugins/two-factor/backup-codes/index.mjs +1 -1
- package/dist/plugins/two-factor/client.d.mts +15 -12
- package/dist/plugins/two-factor/client.mjs +1 -1
- package/dist/plugins/two-factor/error-code.d.mts +12 -10
- package/dist/plugins/two-factor/index.d.mts +36 -32
- package/dist/plugins/two-factor/otp/index.d.mts +4 -2
- package/dist/plugins/two-factor/totp/index.d.mts +7 -5
- package/dist/plugins/two-factor/types.d.mts +1 -1
- package/dist/plugins/username/client.d.mts +11 -9
- package/dist/plugins/username/client.mjs +1 -1
- package/dist/plugins/username/error-codes.d.mts +10 -8
- package/dist/plugins/username/index.d.mts +22 -17
- package/dist/plugins/username/schema.d.mts +5 -3
- package/dist/state.d.mts +1 -0
- package/dist/test-utils/test-instance.d.mts +3 -5
- package/dist/types/adapter.d.mts +1 -1
- package/dist/types/api.d.mts +2 -1
- package/dist/types/auth.d.mts +1 -0
- package/dist/types/helper.d.mts +5 -5
- package/dist/types/index.d.mts +2 -2
- package/dist/types/models.d.mts +1 -0
- package/dist/types/plugins.d.mts +3 -2
- package/dist/utils/index.d.mts +1 -2
- package/dist/utils/url.d.mts +1 -0
- package/package.json +12 -11
|
@@ -1,28 +1,30 @@
|
|
|
1
|
+
import * as _$_better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes";
|
|
2
|
+
|
|
1
3
|
//#region src/plugins/admin/error-codes.d.ts
|
|
2
4
|
declare const ADMIN_ERROR_CODES: {
|
|
3
|
-
USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL:
|
|
4
|
-
FAILED_TO_CREATE_USER:
|
|
5
|
-
USER_ALREADY_EXISTS:
|
|
6
|
-
YOU_CANNOT_BAN_YOURSELF:
|
|
7
|
-
YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:
|
|
8
|
-
YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:
|
|
9
|
-
YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:
|
|
10
|
-
YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:
|
|
11
|
-
YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:
|
|
12
|
-
YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:
|
|
13
|
-
YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:
|
|
14
|
-
YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:
|
|
15
|
-
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:
|
|
16
|
-
BANNED_USER:
|
|
17
|
-
YOU_ARE_NOT_ALLOWED_TO_GET_USER:
|
|
18
|
-
NO_DATA_TO_UPDATE:
|
|
19
|
-
YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS:
|
|
20
|
-
YOU_CANNOT_REMOVE_YOURSELF:
|
|
21
|
-
YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE:
|
|
22
|
-
YOU_CANNOT_IMPERSONATE_ADMINS:
|
|
23
|
-
INVALID_ROLE_TYPE:
|
|
24
|
-
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL:
|
|
25
|
-
PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER:
|
|
5
|
+
USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: _$_better_auth_core_utils_error_codes0.RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
|
|
6
|
+
FAILED_TO_CREATE_USER: _$_better_auth_core_utils_error_codes0.RawError<"FAILED_TO_CREATE_USER">;
|
|
7
|
+
USER_ALREADY_EXISTS: _$_better_auth_core_utils_error_codes0.RawError<"USER_ALREADY_EXISTS">;
|
|
8
|
+
YOU_CANNOT_BAN_YOURSELF: _$_better_auth_core_utils_error_codes0.RawError<"YOU_CANNOT_BAN_YOURSELF">;
|
|
9
|
+
YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: _$_better_auth_core_utils_error_codes0.RawError<"YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE">;
|
|
10
|
+
YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: _$_better_auth_core_utils_error_codes0.RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS">;
|
|
11
|
+
YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: _$_better_auth_core_utils_error_codes0.RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS">;
|
|
12
|
+
YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: _$_better_auth_core_utils_error_codes0.RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS">;
|
|
13
|
+
YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: _$_better_auth_core_utils_error_codes0.RawError<"YOU_ARE_NOT_ALLOWED_TO_BAN_USERS">;
|
|
14
|
+
YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: _$_better_auth_core_utils_error_codes0.RawError<"YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS">;
|
|
15
|
+
YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: _$_better_auth_core_utils_error_codes0.RawError<"YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS">;
|
|
16
|
+
YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: _$_better_auth_core_utils_error_codes0.RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS">;
|
|
17
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: _$_better_auth_core_utils_error_codes0.RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD">;
|
|
18
|
+
BANNED_USER: _$_better_auth_core_utils_error_codes0.RawError<"BANNED_USER">;
|
|
19
|
+
YOU_ARE_NOT_ALLOWED_TO_GET_USER: _$_better_auth_core_utils_error_codes0.RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_USER">;
|
|
20
|
+
NO_DATA_TO_UPDATE: _$_better_auth_core_utils_error_codes0.RawError<"NO_DATA_TO_UPDATE">;
|
|
21
|
+
YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: _$_better_auth_core_utils_error_codes0.RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS">;
|
|
22
|
+
YOU_CANNOT_REMOVE_YOURSELF: _$_better_auth_core_utils_error_codes0.RawError<"YOU_CANNOT_REMOVE_YOURSELF">;
|
|
23
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: _$_better_auth_core_utils_error_codes0.RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE">;
|
|
24
|
+
YOU_CANNOT_IMPERSONATE_ADMINS: _$_better_auth_core_utils_error_codes0.RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
|
|
25
|
+
INVALID_ROLE_TYPE: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_ROLE_TYPE">;
|
|
26
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL: _$_better_auth_core_utils_error_codes0.RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL">;
|
|
27
|
+
PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER: _$_better_auth_core_utils_error_codes0.RawError<"PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER">;
|
|
26
28
|
};
|
|
27
29
|
//#endregion
|
|
28
30
|
export { ADMIN_ERROR_CODES };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AdminOptions, InferAdminRolesFromOption, SessionWithImpersonatedBy, UserWithRole } from "./types.mjs";
|
|
2
2
|
import { admin } from "./admin.mjs";
|
|
3
|
-
export {
|
|
3
|
+
export { AdminOptions, InferAdminRolesFromOption, SessionWithImpersonatedBy, UserWithRole, admin };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Session, User } from "../../types/models.mjs";
|
|
2
2
|
import { InferOptionSchema } from "../../types/plugins.mjs";
|
|
3
|
-
import "../../types/index.mjs";
|
|
4
3
|
import { AccessControl, Role } from "../access/types.mjs";
|
|
5
|
-
import "../access/index.mjs";
|
|
6
4
|
import { AdminSchema } from "./schema.mjs";
|
|
5
|
+
|
|
7
6
|
//#region src/plugins/admin/types.d.ts
|
|
8
7
|
interface UserWithRole extends User {
|
|
9
8
|
role?: string | undefined;
|
|
@@ -60,7 +59,7 @@ interface AdminOptions {
|
|
|
60
59
|
/**
|
|
61
60
|
* Custom permissions for roles.
|
|
62
61
|
*/
|
|
63
|
-
roles?: { [key in string]?: Role
|
|
62
|
+
roles?: { [key in string]?: Role } | undefined;
|
|
64
63
|
/**
|
|
65
64
|
* List of user ids that should have admin access
|
|
66
65
|
*
|
|
@@ -2,6 +2,8 @@ import { schema } from "./schema.mjs";
|
|
|
2
2
|
import { AnonymousOptions, AnonymousSession, UserWithAnonymous } from "./types.mjs";
|
|
3
3
|
import { anonymous } from "./index.mjs";
|
|
4
4
|
import { ANONYMOUS_ERROR_CODES } from "./error-codes.mjs";
|
|
5
|
+
import * as _$_better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes";
|
|
6
|
+
|
|
5
7
|
//#region src/plugins/anonymous/client.d.ts
|
|
6
8
|
declare const anonymousClient: () => {
|
|
7
9
|
id: "anonymous";
|
|
@@ -16,15 +18,15 @@ declare const anonymousClient: () => {
|
|
|
16
18
|
signal: "$sessionSignal";
|
|
17
19
|
}[];
|
|
18
20
|
$ERROR_CODES: {
|
|
19
|
-
FAILED_TO_CREATE_USER:
|
|
20
|
-
INVALID_EMAIL_FORMAT:
|
|
21
|
-
COULD_NOT_CREATE_SESSION:
|
|
22
|
-
ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:
|
|
23
|
-
FAILED_TO_DELETE_ANONYMOUS_USER:
|
|
24
|
-
FAILED_TO_DELETE_ANONYMOUS_USER_SESSIONS:
|
|
25
|
-
USER_IS_NOT_ANONYMOUS:
|
|
26
|
-
DELETE_ANONYMOUS_USER_DISABLED:
|
|
21
|
+
FAILED_TO_CREATE_USER: _$_better_auth_core_utils_error_codes0.RawError<"FAILED_TO_CREATE_USER">;
|
|
22
|
+
INVALID_EMAIL_FORMAT: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_EMAIL_FORMAT">;
|
|
23
|
+
COULD_NOT_CREATE_SESSION: _$_better_auth_core_utils_error_codes0.RawError<"COULD_NOT_CREATE_SESSION">;
|
|
24
|
+
ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY: _$_better_auth_core_utils_error_codes0.RawError<"ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY">;
|
|
25
|
+
FAILED_TO_DELETE_ANONYMOUS_USER: _$_better_auth_core_utils_error_codes0.RawError<"FAILED_TO_DELETE_ANONYMOUS_USER">;
|
|
26
|
+
FAILED_TO_DELETE_ANONYMOUS_USER_SESSIONS: _$_better_auth_core_utils_error_codes0.RawError<"FAILED_TO_DELETE_ANONYMOUS_USER_SESSIONS">;
|
|
27
|
+
USER_IS_NOT_ANONYMOUS: _$_better_auth_core_utils_error_codes0.RawError<"USER_IS_NOT_ANONYMOUS">;
|
|
28
|
+
DELETE_ANONYMOUS_USER_DISABLED: _$_better_auth_core_utils_error_codes0.RawError<"DELETE_ANONYMOUS_USER_DISABLED">;
|
|
27
29
|
};
|
|
28
30
|
};
|
|
29
31
|
//#endregion
|
|
30
|
-
export {
|
|
32
|
+
export { anonymousClient };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import * as _$_better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes";
|
|
2
|
+
|
|
1
3
|
//#region src/plugins/anonymous/error-codes.d.ts
|
|
2
4
|
declare const ANONYMOUS_ERROR_CODES: {
|
|
3
|
-
FAILED_TO_CREATE_USER:
|
|
4
|
-
INVALID_EMAIL_FORMAT:
|
|
5
|
-
COULD_NOT_CREATE_SESSION:
|
|
6
|
-
ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:
|
|
7
|
-
FAILED_TO_DELETE_ANONYMOUS_USER:
|
|
8
|
-
FAILED_TO_DELETE_ANONYMOUS_USER_SESSIONS:
|
|
9
|
-
USER_IS_NOT_ANONYMOUS:
|
|
10
|
-
DELETE_ANONYMOUS_USER_DISABLED:
|
|
5
|
+
FAILED_TO_CREATE_USER: _$_better_auth_core_utils_error_codes0.RawError<"FAILED_TO_CREATE_USER">;
|
|
6
|
+
INVALID_EMAIL_FORMAT: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_EMAIL_FORMAT">;
|
|
7
|
+
COULD_NOT_CREATE_SESSION: _$_better_auth_core_utils_error_codes0.RawError<"COULD_NOT_CREATE_SESSION">;
|
|
8
|
+
ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY: _$_better_auth_core_utils_error_codes0.RawError<"ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY">;
|
|
9
|
+
FAILED_TO_DELETE_ANONYMOUS_USER: _$_better_auth_core_utils_error_codes0.RawError<"FAILED_TO_DELETE_ANONYMOUS_USER">;
|
|
10
|
+
FAILED_TO_DELETE_ANONYMOUS_USER_SESSIONS: _$_better_auth_core_utils_error_codes0.RawError<"FAILED_TO_DELETE_ANONYMOUS_USER_SESSIONS">;
|
|
11
|
+
USER_IS_NOT_ANONYMOUS: _$_better_auth_core_utils_error_codes0.RawError<"USER_IS_NOT_ANONYMOUS">;
|
|
12
|
+
DELETE_ANONYMOUS_USER_DISABLED: _$_better_auth_core_utils_error_codes0.RawError<"DELETE_ANONYMOUS_USER_DISABLED">;
|
|
11
13
|
};
|
|
12
14
|
//#endregion
|
|
13
15
|
export { ANONYMOUS_ERROR_CODES };
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { AnonymousOptions, AnonymousSession, UserWithAnonymous } from "./types.mjs";
|
|
2
|
+
import * as _$_better_auth_core0 from "@better-auth/core";
|
|
3
|
+
import * as _$_better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes";
|
|
4
|
+
import * as _$better_call0 from "better-call";
|
|
5
|
+
|
|
2
6
|
//#region src/plugins/anonymous/index.d.ts
|
|
3
7
|
declare module "@better-auth/core" {
|
|
4
8
|
interface BetterAuthPluginRegistry<AuthOptions, Options> {
|
|
@@ -11,7 +15,7 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
11
15
|
id: "anonymous";
|
|
12
16
|
version: string;
|
|
13
17
|
endpoints: {
|
|
14
|
-
signInAnonymous:
|
|
18
|
+
signInAnonymous: _$better_call0.StrictEndpoint<"/sign-in/anonymous", {
|
|
15
19
|
method: "POST";
|
|
16
20
|
metadata: {
|
|
17
21
|
openapi: {
|
|
@@ -50,9 +54,9 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
50
54
|
image?: string | null | undefined;
|
|
51
55
|
};
|
|
52
56
|
}>;
|
|
53
|
-
deleteAnonymousUser:
|
|
57
|
+
deleteAnonymousUser: _$better_call0.StrictEndpoint<"/delete-anonymous-user", {
|
|
54
58
|
method: "POST";
|
|
55
|
-
use: (
|
|
59
|
+
use: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
|
|
56
60
|
session: {
|
|
57
61
|
session: Record<string, any> & {
|
|
58
62
|
id: string;
|
|
@@ -74,7 +78,7 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
74
78
|
image?: string | null | undefined;
|
|
75
79
|
};
|
|
76
80
|
};
|
|
77
|
-
}
|
|
81
|
+
}>>[];
|
|
78
82
|
metadata: {
|
|
79
83
|
openapi: {
|
|
80
84
|
description: string;
|
|
@@ -135,8 +139,8 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
135
139
|
};
|
|
136
140
|
hooks: {
|
|
137
141
|
after: {
|
|
138
|
-
matcher(ctx:
|
|
139
|
-
handler: (inputContext:
|
|
142
|
+
matcher(ctx: _$_better_auth_core0.HookEndpointContext): boolean;
|
|
143
|
+
handler: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>;
|
|
140
144
|
}[];
|
|
141
145
|
};
|
|
142
146
|
options: AnonymousOptions | undefined;
|
|
@@ -153,15 +157,15 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
153
157
|
};
|
|
154
158
|
};
|
|
155
159
|
$ERROR_CODES: {
|
|
156
|
-
FAILED_TO_CREATE_USER:
|
|
157
|
-
INVALID_EMAIL_FORMAT:
|
|
158
|
-
COULD_NOT_CREATE_SESSION:
|
|
159
|
-
ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:
|
|
160
|
-
FAILED_TO_DELETE_ANONYMOUS_USER:
|
|
161
|
-
FAILED_TO_DELETE_ANONYMOUS_USER_SESSIONS:
|
|
162
|
-
USER_IS_NOT_ANONYMOUS:
|
|
163
|
-
DELETE_ANONYMOUS_USER_DISABLED:
|
|
160
|
+
FAILED_TO_CREATE_USER: _$_better_auth_core_utils_error_codes0.RawError<"FAILED_TO_CREATE_USER">;
|
|
161
|
+
INVALID_EMAIL_FORMAT: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_EMAIL_FORMAT">;
|
|
162
|
+
COULD_NOT_CREATE_SESSION: _$_better_auth_core_utils_error_codes0.RawError<"COULD_NOT_CREATE_SESSION">;
|
|
163
|
+
ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY: _$_better_auth_core_utils_error_codes0.RawError<"ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY">;
|
|
164
|
+
FAILED_TO_DELETE_ANONYMOUS_USER: _$_better_auth_core_utils_error_codes0.RawError<"FAILED_TO_DELETE_ANONYMOUS_USER">;
|
|
165
|
+
FAILED_TO_DELETE_ANONYMOUS_USER_SESSIONS: _$_better_auth_core_utils_error_codes0.RawError<"FAILED_TO_DELETE_ANONYMOUS_USER_SESSIONS">;
|
|
166
|
+
USER_IS_NOT_ANONYMOUS: _$_better_auth_core_utils_error_codes0.RawError<"USER_IS_NOT_ANONYMOUS">;
|
|
167
|
+
DELETE_ANONYMOUS_USER_DISABLED: _$_better_auth_core_utils_error_codes0.RawError<"DELETE_ANONYMOUS_USER_DISABLED">;
|
|
164
168
|
};
|
|
165
169
|
};
|
|
166
170
|
//#endregion
|
|
167
|
-
export {
|
|
171
|
+
export { AnonymousOptions, AnonymousSession, UserWithAnonymous, anonymous };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Session, User } from "../../types/models.mjs";
|
|
2
2
|
import { InferOptionSchema } from "../../types/plugins.mjs";
|
|
3
|
-
import "../../types/index.mjs";
|
|
4
3
|
import { schema } from "./schema.mjs";
|
|
5
4
|
import { AuthContext, Awaitable, GenericEndpointContext } from "@better-auth/core";
|
|
6
5
|
import { EndpointContext } from "better-call";
|
|
6
|
+
|
|
7
7
|
//#region src/plugins/anonymous/types.d.ts
|
|
8
8
|
type AnonymousSession = {
|
|
9
9
|
session: Session;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import * as _$_better_auth_core0 from "@better-auth/core";
|
|
2
|
+
import * as _$better_call0 from "better-call";
|
|
3
|
+
|
|
1
4
|
//#region src/plugins/bearer/index.d.ts
|
|
2
5
|
declare module "@better-auth/core" {
|
|
3
6
|
interface BetterAuthPluginRegistry<AuthOptions, Options> {
|
|
@@ -24,16 +27,16 @@ declare const bearer: (options?: BearerOptions | undefined) => {
|
|
|
24
27
|
version: string;
|
|
25
28
|
hooks: {
|
|
26
29
|
before: {
|
|
27
|
-
matcher(context:
|
|
28
|
-
handler: (inputContext:
|
|
30
|
+
matcher(context: _$_better_auth_core0.HookEndpointContext): boolean;
|
|
31
|
+
handler: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
|
|
29
32
|
context: {
|
|
30
33
|
headers: Headers;
|
|
31
34
|
};
|
|
32
|
-
} | undefined
|
|
35
|
+
} | undefined>>;
|
|
33
36
|
}[];
|
|
34
37
|
after: {
|
|
35
|
-
matcher(context:
|
|
36
|
-
handler: (inputContext:
|
|
38
|
+
matcher(context: _$_better_auth_core0.HookEndpointContext): true;
|
|
39
|
+
handler: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>;
|
|
37
40
|
}[];
|
|
38
41
|
};
|
|
39
42
|
options: BearerOptions | undefined;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { BaseCaptchaOptions, CaptchaFoxOptions, CaptchaOptions, CloudflareTurnstileOptions, GoogleRecaptchaOptions, HCaptchaOptions, Provider } from "./types.mjs";
|
|
2
|
+
import * as _$_better_auth_core0 from "@better-auth/core";
|
|
3
|
+
import * as _$_better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes";
|
|
4
|
+
|
|
2
5
|
//#region src/plugins/captcha/index.d.ts
|
|
3
6
|
declare module "@better-auth/core" {
|
|
4
7
|
interface BetterAuthPluginRegistry<AuthOptions, Options> {
|
|
@@ -11,14 +14,14 @@ declare const captcha: (options: CaptchaOptions) => {
|
|
|
11
14
|
id: "captcha";
|
|
12
15
|
version: string;
|
|
13
16
|
$ERROR_CODES: {
|
|
14
|
-
VERIFICATION_FAILED:
|
|
15
|
-
MISSING_RESPONSE:
|
|
16
|
-
UNKNOWN_ERROR:
|
|
17
|
+
VERIFICATION_FAILED: _$_better_auth_core_utils_error_codes0.RawError<"VERIFICATION_FAILED">;
|
|
18
|
+
MISSING_RESPONSE: _$_better_auth_core_utils_error_codes0.RawError<"MISSING_RESPONSE">;
|
|
19
|
+
UNKNOWN_ERROR: _$_better_auth_core_utils_error_codes0.RawError<"UNKNOWN_ERROR">;
|
|
17
20
|
};
|
|
18
|
-
onRequest: (request: Request, ctx:
|
|
21
|
+
onRequest: (request: Request, ctx: _$_better_auth_core0.AuthContext) => Promise<{
|
|
19
22
|
response: Response;
|
|
20
23
|
} | undefined>;
|
|
21
24
|
options: CaptchaOptions;
|
|
22
25
|
};
|
|
23
26
|
//#endregion
|
|
24
|
-
export {
|
|
27
|
+
export { BaseCaptchaOptions, CaptchaFoxOptions, CaptchaOptions, CloudflareTurnstileOptions, GoogleRecaptchaOptions, HCaptchaOptions, Provider, captcha };
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import * as _$_better_auth_core0 from "@better-auth/core";
|
|
1
2
|
import { BetterAuthOptions, GenericEndpointContext } from "@better-auth/core";
|
|
2
3
|
import { Session, User } from "@better-auth/core/db";
|
|
4
|
+
import * as _$better_call0 from "better-call";
|
|
5
|
+
import * as _$zod from "zod";
|
|
6
|
+
import * as _$zod_v4_core0 from "zod/v4/core";
|
|
7
|
+
|
|
3
8
|
//#region src/plugins/custom-session/index.d.ts
|
|
4
9
|
declare module "@better-auth/core" {
|
|
5
10
|
interface BetterAuthPluginRegistry<AuthOptions, Options> {
|
|
@@ -23,17 +28,17 @@ declare const customSession: <Returns extends Record<string, any>, O extends Bet
|
|
|
23
28
|
version: string;
|
|
24
29
|
hooks: {
|
|
25
30
|
after: {
|
|
26
|
-
matcher: (ctx:
|
|
27
|
-
handler: (inputContext:
|
|
31
|
+
matcher: (ctx: _$_better_auth_core0.HookEndpointContext) => boolean;
|
|
32
|
+
handler: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<Awaited<Returns>[] | undefined>>;
|
|
28
33
|
}[];
|
|
29
34
|
};
|
|
30
35
|
endpoints: {
|
|
31
|
-
getSession:
|
|
36
|
+
getSession: _$better_call0.StrictEndpoint<"/get-session", {
|
|
32
37
|
method: "GET";
|
|
33
|
-
query:
|
|
34
|
-
disableCookieCache:
|
|
35
|
-
disableRefresh:
|
|
36
|
-
},
|
|
38
|
+
query: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
39
|
+
disableCookieCache: _$zod.ZodOptional<_$zod.ZodCoercedBoolean<unknown>>;
|
|
40
|
+
disableRefresh: _$zod.ZodOptional<_$zod.ZodCoercedBoolean<unknown>>;
|
|
41
|
+
}, _$zod_v4_core0.$strip>>;
|
|
37
42
|
metadata: {
|
|
38
43
|
CUSTOM_SESSION: boolean;
|
|
39
44
|
openapi: {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { TimeString, ms, sec } from "../../utils/time.mjs";
|
|
2
|
+
import * as _$_better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes";
|
|
3
|
+
import * as _$better_call0 from "better-call";
|
|
2
4
|
import * as z from "zod";
|
|
5
|
+
|
|
3
6
|
//#region src/plugins/device-authorization/index.d.ts
|
|
4
7
|
declare module "@better-auth/core" {
|
|
5
8
|
interface BetterAuthPluginRegistry<AuthOptions, Options> {
|
|
@@ -97,7 +100,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
97
100
|
};
|
|
98
101
|
};
|
|
99
102
|
endpoints: {
|
|
100
|
-
deviceCode:
|
|
103
|
+
deviceCode: _$better_call0.StrictEndpoint<"/device/code", {
|
|
101
104
|
method: "POST";
|
|
102
105
|
body: z.ZodObject<{
|
|
103
106
|
client_id: z.ZodString;
|
|
@@ -183,7 +186,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
183
186
|
expires_in: number;
|
|
184
187
|
interval: number;
|
|
185
188
|
}>;
|
|
186
|
-
deviceToken:
|
|
189
|
+
deviceToken: _$better_call0.StrictEndpoint<"/device/token", {
|
|
187
190
|
method: "POST";
|
|
188
191
|
body: z.ZodObject<{
|
|
189
192
|
grant_type: z.ZodLiteral<"urn:ietf:params:oauth:grant-type:device_code">;
|
|
@@ -251,7 +254,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
251
254
|
expires_in: number;
|
|
252
255
|
scope: string;
|
|
253
256
|
}>;
|
|
254
|
-
deviceVerify:
|
|
257
|
+
deviceVerify: _$better_call0.StrictEndpoint<"/device", {
|
|
255
258
|
method: "GET";
|
|
256
259
|
query: z.ZodObject<{
|
|
257
260
|
user_code: z.ZodString;
|
|
@@ -294,7 +297,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
294
297
|
user_code: string;
|
|
295
298
|
status: string;
|
|
296
299
|
}>;
|
|
297
|
-
deviceApprove:
|
|
300
|
+
deviceApprove: _$better_call0.StrictEndpoint<"/device/approve", {
|
|
298
301
|
method: "POST";
|
|
299
302
|
body: z.ZodObject<{
|
|
300
303
|
userCode: z.ZodString;
|
|
@@ -335,7 +338,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
335
338
|
}, {
|
|
336
339
|
success: boolean;
|
|
337
340
|
}>;
|
|
338
|
-
deviceDeny:
|
|
341
|
+
deviceDeny: _$better_call0.StrictEndpoint<"/device/deny", {
|
|
339
342
|
method: "POST";
|
|
340
343
|
body: z.ZodObject<{
|
|
341
344
|
userCode: z.ZodString;
|
|
@@ -377,19 +380,19 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
377
380
|
}>;
|
|
378
381
|
};
|
|
379
382
|
$ERROR_CODES: {
|
|
380
|
-
USER_NOT_FOUND:
|
|
381
|
-
FAILED_TO_CREATE_SESSION:
|
|
382
|
-
INVALID_DEVICE_CODE:
|
|
383
|
-
EXPIRED_DEVICE_CODE:
|
|
384
|
-
EXPIRED_USER_CODE:
|
|
385
|
-
AUTHORIZATION_PENDING:
|
|
386
|
-
ACCESS_DENIED:
|
|
387
|
-
INVALID_USER_CODE:
|
|
388
|
-
DEVICE_CODE_ALREADY_PROCESSED:
|
|
389
|
-
DEVICE_CODE_NOT_CLAIMED:
|
|
390
|
-
POLLING_TOO_FREQUENTLY:
|
|
391
|
-
INVALID_DEVICE_CODE_STATUS:
|
|
392
|
-
AUTHENTICATION_REQUIRED:
|
|
383
|
+
USER_NOT_FOUND: _$_better_auth_core_utils_error_codes0.RawError<"USER_NOT_FOUND">;
|
|
384
|
+
FAILED_TO_CREATE_SESSION: _$_better_auth_core_utils_error_codes0.RawError<"FAILED_TO_CREATE_SESSION">;
|
|
385
|
+
INVALID_DEVICE_CODE: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_DEVICE_CODE">;
|
|
386
|
+
EXPIRED_DEVICE_CODE: _$_better_auth_core_utils_error_codes0.RawError<"EXPIRED_DEVICE_CODE">;
|
|
387
|
+
EXPIRED_USER_CODE: _$_better_auth_core_utils_error_codes0.RawError<"EXPIRED_USER_CODE">;
|
|
388
|
+
AUTHORIZATION_PENDING: _$_better_auth_core_utils_error_codes0.RawError<"AUTHORIZATION_PENDING">;
|
|
389
|
+
ACCESS_DENIED: _$_better_auth_core_utils_error_codes0.RawError<"ACCESS_DENIED">;
|
|
390
|
+
INVALID_USER_CODE: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_USER_CODE">;
|
|
391
|
+
DEVICE_CODE_ALREADY_PROCESSED: _$_better_auth_core_utils_error_codes0.RawError<"DEVICE_CODE_ALREADY_PROCESSED">;
|
|
392
|
+
DEVICE_CODE_NOT_CLAIMED: _$_better_auth_core_utils_error_codes0.RawError<"DEVICE_CODE_NOT_CLAIMED">;
|
|
393
|
+
POLLING_TOO_FREQUENTLY: _$_better_auth_core_utils_error_codes0.RawError<"POLLING_TOO_FREQUENTLY">;
|
|
394
|
+
INVALID_DEVICE_CODE_STATUS: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_DEVICE_CODE_STATUS">;
|
|
395
|
+
AUTHENTICATION_REQUIRED: _$_better_auth_core_utils_error_codes0.RawError<"AUTHENTICATION_REQUIRED">;
|
|
393
396
|
};
|
|
394
397
|
options: Partial<{
|
|
395
398
|
expiresIn: TimeString;
|
|
@@ -420,4 +423,4 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
420
423
|
}>;
|
|
421
424
|
};
|
|
422
425
|
//#endregion
|
|
423
|
-
export { DeviceAuthorizationOptions,
|
|
426
|
+
export { DeviceAuthorizationOptions, TimeString, deviceAuthorization, deviceAuthorizationOptionsSchema, ms, sec };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { emailOTP } from "./index.mjs";
|
|
2
2
|
import { EMAIL_OTP_ERROR_CODES } from "./error-codes.mjs";
|
|
3
|
+
import * as _$_better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes";
|
|
4
|
+
|
|
3
5
|
//#region src/plugins/email-otp/client.d.ts
|
|
4
6
|
declare const emailOTPClient: () => {
|
|
5
7
|
id: "email-otp";
|
|
@@ -10,10 +12,10 @@ declare const emailOTPClient: () => {
|
|
|
10
12
|
signal: "$sessionSignal";
|
|
11
13
|
}[];
|
|
12
14
|
$ERROR_CODES: {
|
|
13
|
-
OTP_EXPIRED:
|
|
14
|
-
INVALID_OTP:
|
|
15
|
-
TOO_MANY_ATTEMPTS:
|
|
15
|
+
OTP_EXPIRED: _$_better_auth_core_utils_error_codes0.RawError<"OTP_EXPIRED">;
|
|
16
|
+
INVALID_OTP: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_OTP">;
|
|
17
|
+
TOO_MANY_ATTEMPTS: _$_better_auth_core_utils_error_codes0.RawError<"TOO_MANY_ATTEMPTS">;
|
|
16
18
|
};
|
|
17
19
|
};
|
|
18
20
|
//#endregion
|
|
19
|
-
export {
|
|
21
|
+
export { emailOTPClient };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import * as _$_better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes";
|
|
2
|
+
|
|
1
3
|
//#region src/plugins/email-otp/error-codes.d.ts
|
|
2
4
|
declare const EMAIL_OTP_ERROR_CODES: {
|
|
3
|
-
OTP_EXPIRED:
|
|
4
|
-
INVALID_OTP:
|
|
5
|
-
TOO_MANY_ATTEMPTS:
|
|
5
|
+
OTP_EXPIRED: _$_better_auth_core_utils_error_codes0.RawError<"OTP_EXPIRED">;
|
|
6
|
+
INVALID_OTP: _$_better_auth_core_utils_error_codes0.RawError<"INVALID_OTP">;
|
|
7
|
+
TOO_MANY_ATTEMPTS: _$_better_auth_core_utils_error_codes0.RawError<"TOO_MANY_ATTEMPTS">;
|
|
6
8
|
};
|
|
7
9
|
//#endregion
|
|
8
10
|
export { EMAIL_OTP_ERROR_CODES };
|