src/auth/dto/2fa.dto.ts
Properties |
| password |
Type : string
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/auth/dto/2fa.dto.ts:27
|
import {
IsNotEmpty,
IsNumberString,
IsString,
MaxLength,
MinLength,
} from 'class-validator';
import { IsCodeExpired } from '../../common/decorators/codeexpired.decorator';
import { IsCodeValid } from '../../common/decorators/codevaild.decorator';
import { IsCodeUsed } from '../../common/decorators/codeused.decorator';
export class TwoFactorEnableDto {
@IsNotEmpty()
@IsNumberString()
@MinLength(6)
@MaxLength(6)
code: string;
@IsNotEmpty()
@IsString()
password: string;
}
export class TwoFactorDisableDto {
@IsNotEmpty()
@IsString()
password: string;
}
export class TwoFactorLoginDto {
@IsNotEmpty()
@IsNumberString()
@MinLength(6)
@MaxLength(6)
token: string;
@IsString()
@IsNotEmpty()
@IsCodeExpired()
@IsCodeValid()
@IsCodeUsed()
code: string;
}