better-auth
Version:
The most comprehensive authentication framework for TypeScript.
17 lines (16 loc) • 794 B
JavaScript
import { defineErrorCodes } from "@better-auth/core/utils/error-codes";
//#region src/plugins/two-factor/error-code.ts
const TWO_FACTOR_ERROR_CODES = defineErrorCodes({
OTP_NOT_ENABLED: "OTP not enabled",
OTP_HAS_EXPIRED: "OTP has expired",
TOTP_NOT_ENABLED: "TOTP not enabled",
TWO_FACTOR_NOT_ENABLED: "Two factor isn't enabled",
BACKUP_CODES_NOT_ENABLED: "Backup codes aren't enabled",
INVALID_BACKUP_CODE: "Invalid backup code",
INVALID_CODE: "Invalid code",
TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: "Too many attempts. Please request a new code.",
ACCOUNT_TEMPORARILY_LOCKED: "Too many failed verification attempts. Your account is temporarily locked. Please try again later.",
INVALID_TWO_FACTOR_COOKIE: "Invalid two factor cookie"
});
//#endregion
export { TWO_FACTOR_ERROR_CODES };