mirror of
https://github.com/better-auth/better-auth.git
synced 2026-06-03 04:46:19 -05:00
fix(two-factor): 2fa error codes failing to infer (#2102)
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user