(20250303) Added print statements.

This commit is contained in:
2025-03-03 15:19:07 +05:30
parent 3e7be926da
commit ae503303b1
2 changed files with 7 additions and 1 deletions
+2
View File
@@ -160,6 +160,7 @@ class TimedOTPController:
# Generate the OTP:
otp_key = self.KEY_PREFIX + redis_cache.make_key(str(inbound_data.id))
print("GENERATE KEY:", otp_key)
otp_client = HashedOTP(secret = HashedOTP.generate_secret())
otp = otp_client.generate_otp(count = 0)
@@ -207,6 +208,7 @@ class TimedOTPController:
# Fetch the OTP from Redis:
otp_key = self.KEY_PREFIX + redis_cache.make_key(str(inbound_data.id))
print("VERIFY KEY:", otp_key)
stored_otp = await redis_cache.get(key = otp_key)
if not stored_otp:
response.message = "No OTP found for this request. It may have expired."