@nestjs-mod/two-factor
Version:
Two factor module with an error filter, guard, controller, database migrations and rest-sdk for work with module from other nodejs appliaction
16 lines (15 loc) • 637 B
TypeScript
export declare enum TwoFactorErrorEnum {
COMMON = "TWO_FACTOR-000",
TwoFactorCodeNotSet = "TWO-FACTOR-001",
TwoFactorCodeWrongCode = "TWO-FACTOR-002",
TwoFactorCodeIsOutdated = "TWO-FACTOR-003",
TwoFactorCodePleaseWaitXXSeconds = "TWO-FACTOR-004",
TwoFactorCodeIsUsed = "TWO-FACTOR-005"
}
export declare const TWO_FACTOR_ERROR_ENUM_TITLES: Record<TwoFactorErrorEnum, string>;
export declare class TwoFactorError<T = unknown> extends Error {
message: string;
code: TwoFactorErrorEnum;
metadata?: T;
constructor(message?: string | TwoFactorErrorEnum, code?: TwoFactorErrorEnum | T, metadata?: T);
}