Update OTP generation interval, enhance SMS sending functionality, and add age validation for temporary user registration
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 1m50s

This commit is contained in:
2025-04-19 16:18:45 +05:00
parent f77779a84f
commit c006525aaa
5 changed files with 92 additions and 15 deletions

View File

@ -79,11 +79,11 @@ class TemporaryUser(models.Model):
otp_verified = models.BooleanField(default=False)
def generate_otp(self):
totp = pyotp.TOTP(self.otp_secret, interval=300)
totp = pyotp.TOTP(self.otp_secret, interval=1800)
return totp.now()
def verify_otp(self, otp):
totp = pyotp.TOTP(self.otp_secret, interval=300)
totp = pyotp.TOTP(self.otp_secret, interval=1800)
return totp.verify(otp)
def is_expired(self):