Files
Bread Genie 84b5ac8022 refactor(otp): use a more random otp generator
- also widen the rate limit window for otp endpoints
2025-02-08 16:02:05 +05:30

8 lines
161 B
Python

import os
def generate_otp():
"""Generates a cryptographically secure random OTP"""
return int.from_bytes(os.urandom(5), byteorder="big") % 900000 + 100000