mirror of
https://github.com/i701/sarlink-portal-api.git
synced 2025-06-28 09:50:05 +00:00
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
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 1m50s
This commit is contained in:
@ -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