Update OTP generation interval, enhance SMS sending functionality, and add age validation for temporary user registration
This commit is contained in:
+2
-2
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user