fix(two-factor): 2fa error codes failing to infer (#2102)

This commit is contained in:
Maxwell
2025-04-04 16:24:29 +10:00
committed by GitHub
parent 1116638cc4
commit f7199e3e41

View File

@@ -17,6 +17,8 @@ import { schema } from "./schema";
import { BASE_ERROR_CODES } from "../../error/codes";
import { createOTP } from "@better-auth/utils/otp";
import { createHMAC } from "@better-auth/utils/hmac";
import { TWO_FACTOR_ERROR_CODES } from "./error-code";
export * from "./error-code";
export const twoFactor = (options?: TwoFactorOptions) => {
const opts = {
@@ -326,6 +328,7 @@ export const twoFactor = (options?: TwoFactorOptions) => {
max: 3,
},
],
$ERROR_CODES: TWO_FACTOR_ERROR_CODES,
} satisfies BetterAuthPlugin;
};