Allow register to link existing Meshkee accounts after acknowledgement.
Adds optional acknowledgeExistingAccount and documents the CELL_EXISTS_OTHER_SITE → SMS link flow for storefronts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
f7cee26975
commit
0f92307fcd
@@ -79,7 +79,7 @@ export class AuthService {
|
||||
existingUser.passwordHash,
|
||||
);
|
||||
|
||||
if (!passwordValid) {
|
||||
if (!passwordValid && !dto.acknowledgeExistingAccount) {
|
||||
const otherNames = existingUser.businessCustomers
|
||||
.map((item) => item.business.nameFa?.trim() || item.business.name)
|
||||
.filter(Boolean);
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
import { IsEmail, IsOptional, IsString, Matches, MinLength } from 'class-validator';
|
||||
import {
|
||||
IsBoolean,
|
||||
IsEmail,
|
||||
IsOptional,
|
||||
IsString,
|
||||
Matches,
|
||||
MinLength,
|
||||
} from 'class-validator';
|
||||
|
||||
export class RegisterDto {
|
||||
@IsString()
|
||||
@@ -27,4 +34,12 @@ export class RegisterDto {
|
||||
@IsString()
|
||||
@MinLength(3)
|
||||
domain!: string;
|
||||
|
||||
/**
|
||||
* When true, link an existing Meshkee account (other websites) to this tenant
|
||||
* without requiring the existing password. Existing password and profile stay unchanged.
|
||||
*/
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
acknowledgeExistingAccount?: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user