Use password login without OTP; keep OTP for signup and optional mobile login.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,13 +10,11 @@ import {
|
||||
import { BUSINESS_FIELDS } from '@mento/shared';
|
||||
|
||||
export class LoginDto {
|
||||
/** ایمیل یا موبایل — کلاینت جدید */
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MinLength(3)
|
||||
identifier?: string;
|
||||
|
||||
/** سازگاری با کلاینت قدیمی */
|
||||
@IsOptional()
|
||||
@IsEmail()
|
||||
email?: string;
|
||||
@@ -26,7 +24,15 @@ export class LoginDto {
|
||||
password!: string;
|
||||
}
|
||||
|
||||
export class LoginVerifyOtpDto {
|
||||
export class LoginOtpRequestDto {
|
||||
@IsString()
|
||||
@Matches(/^09\d{9}$|^\+98\d{10}$|^98\d{10}$|^9\d{9}$/, {
|
||||
message: 'شماره موبایل معتبر نیست',
|
||||
})
|
||||
mobile!: string;
|
||||
}
|
||||
|
||||
export class LoginOtpVerifyDto {
|
||||
@IsString()
|
||||
challengeId!: string;
|
||||
|
||||
@@ -77,9 +83,10 @@ export class RegisterVerifyOtpDto {
|
||||
@IsString()
|
||||
challengeId!: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MinLength(4)
|
||||
emailCode!: string;
|
||||
emailCode?: string;
|
||||
|
||||
@IsString()
|
||||
@MinLength(4)
|
||||
|
||||
Reference in New Issue
Block a user