MukeshKapoor25 commited on
Commit
e9eedce
·
1 Parent(s): 9412465

fix(customer_auth): Replace random OTP generation with hardcoded value for testing

Browse files

- Replace dynamic OTP generation with hardcoded "123456" value for testing purposes
- Comment out random OTP generation logic using secrets.randbelow()
- Add TODO comment to restore random OTP generation for production deployment
- Maintain 5-minute OTP expiration window unchanged

app/auth/services/customer_auth_service.py CHANGED
@@ -65,8 +65,10 @@ class CustomerAuthService:
65
  # Normalize mobile number
66
  normalized_mobile = self._normalize_mobile(mobile)
67
 
68
- # Generate 6-digit OTP
69
- otp = str(secrets.randbelow(900000) + 100000)
 
 
70
 
71
  # Set expiration (5 minutes)
72
  expires_at = datetime.utcnow() + timedelta(minutes=5)
 
65
  # Normalize mobile number
66
  normalized_mobile = self._normalize_mobile(mobile)
67
 
68
+ # Generate 6-digit OTP (hardcoded for testing)
69
+ # TODO: Replace with random OTP generation for production
70
+ # otp = str(secrets.randbelow(900000) + 100000)
71
+ otp = "123456"
72
 
73
  # Set expiration (5 minutes)
74
  expires_at = datetime.utcnow() + timedelta(minutes=5)