fix: remove + from App Review accounts to match normalized format

This commit is contained in:
Hamza-Ayed
2026-07-18 21:12:24 +03:00
parent 79cb19d4f8
commit e2a472356c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -84,7 +84,7 @@ export class AuthService {
await this.redis.set(this.otpKey(tenant.id, canonical), code, 'EX', ttl);
// أرقام مخصصة لاختبارات E2E ومراجعي Apple/Google (لا تستهلك رصيد).
const isAppReviewAccount = ['+962790000001', '+962790000002'].includes(canonical);
const isAppReviewAccount = ['962790000001', '962790000002'].includes(canonical);
if (this.devMode || isAppReviewAccount) {
this.logger.log(`OTP (dev/review) tenant=${tenant.slug} phone=${canonical} => ${code}`);
return { success: true, message: 'OTP sent (dev)', dev_code: code };
@@ -108,7 +108,7 @@ export class AuthService {
const canonical = this.phones.normalize(phone, tenant.countryPack);
// في وضع التطوير أو حسابات مراجعة آبل/جوجل: الرمز الثابت 1234 يمرّ دائماً.
const isAppReviewAccount = ['+962790000001', '+962790000002'].includes(canonical);
const isAppReviewAccount = ['962790000001', '962790000002'].includes(canonical);
const devBypass = (this.devMode || isAppReviewAccount) && code === '1234';
if (!devBypass) {
const attemptsKey = this.otpAttemptsKey(tenant.id, canonical);
@@ -36,7 +36,7 @@ export class DriversService {
data: Partial<Driver>,
): Promise<Driver> {
const user = await this.users.findById(tenantId, userId);
const isAppReview = ['+962790000001', '+962790000002'].includes(user?.phone ?? '');
const isAppReview = ['962790000001', '962790000002'].includes(user?.phone ?? '');
let driver = await this.findByUser(tenantId, userId);
if (!driver) {