import * as _$_better_auth_core0 from "@better-auth/core"; import * as _$_better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes"; //#region src/plugins/haveibeenpwned/index.d.ts declare module "@better-auth/core" { interface BetterAuthPluginRegistry { "have-i-been-pwned": { creator: typeof haveIBeenPwned; }; } } /** * Checks whether a password appears in the Have I Been Pwned password corpus. * Only the first five characters of its SHA-1 hash are sent to the service. * * @returns Whether the password has been compromised. * @throws {APIError} When the password could not be checked. */ declare function isPasswordCompromised(password: string): Promise; interface HaveIBeenPwnedOptions { /** * Custom error message shown when a compromised password is detected. */ customPasswordCompromisedMessage?: string | undefined; /** * Paths to check for password * * @default ["/sign-up/email", "/change-password", "/reset-password", "/email-otp/reset-password", "/phone-number/reset-password", "/admin/create-user", "/admin/set-user-password"] */ paths?: string[]; /** * Enable or disable password checks against the HIBP database. * * @default true */ enabled?: boolean | undefined; } declare const haveIBeenPwned: (options?: HaveIBeenPwnedOptions | undefined) => { id: "have-i-been-pwned"; version: string; init(ctx: _$_better_auth_core0.AuthContext): { context: { password: { hash(password: string): Promise; verify: (data: { password: string; hash: string; }) => Promise; config: { minPasswordLength: number; maxPasswordLength: number; }; checkPassword: (userId: string, ctx: _$_better_auth_core0.GenericEndpointContext<_$_better_auth_core0.BetterAuthOptions>) => Promise; }; }; }; options: HaveIBeenPwnedOptions | undefined; $ERROR_CODES: { PASSWORD_COMPROMISED: _$_better_auth_core_utils_error_codes0.RawError<"PASSWORD_COMPROMISED">; }; }; //#endregion export { HaveIBeenPwnedOptions, haveIBeenPwned, isPasswordCompromised };