Improve cross-site customer signup and login membership.
Same-password register joins silently; mismatched password explains the existing Meshkee account; login/OTP with domain attaches business membership. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
953b87b616
commit
acc8f35682
@@ -1,4 +1,4 @@
|
||||
import { IsString, Length, Matches } from 'class-validator';
|
||||
import { IsOptional, IsString, Length, Matches } from 'class-validator';
|
||||
|
||||
export class LoginOtpDto {
|
||||
@IsString()
|
||||
@@ -11,4 +11,9 @@ export class LoginOtpDto {
|
||||
@Length(6, 6)
|
||||
@Matches(/^\d{6}$/, { message: 'code must be a 6-digit number' })
|
||||
code!: string;
|
||||
|
||||
/** Website apex — when set, attaches customer membership for that tenant on successful OTP login. */
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
domain?: string;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IsString, Matches, MinLength } from 'class-validator';
|
||||
import { IsOptional, IsString, Matches, MinLength } from 'class-validator';
|
||||
|
||||
export class LoginDto {
|
||||
@IsString()
|
||||
@@ -10,4 +10,9 @@ export class LoginDto {
|
||||
@IsString()
|
||||
@MinLength(8)
|
||||
password!: string;
|
||||
|
||||
/** Website apex — when set, attaches customer membership for that tenant on successful login. */
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
domain?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user