fix: Require mfa code to change email (#10354)

This commit is contained in:
Tomi Turtiainen
2024-08-15 10:36:04 +03:00
committed by GitHub
parent 483e324d4c
commit 39c8e50ad0
8 changed files with 181 additions and 41 deletions

View File

@@ -43,6 +43,11 @@ export class UserUpdatePayload implements Pick<User, 'email' | 'firstName' | 'la
@IsString({ message: 'Last name must be of type string.' })
@Length(1, 32, { message: 'Last name must be $constraint1 to $constraint2 characters long.' })
lastName: string;
@IsOptional()
@Expose()
@IsString({ message: 'Two factor code must be a string.' })
mfaCode?: string;
}
export class UserSettingsUpdatePayload {