Skip to content

Commit 45a9ae7

Browse files
authored
Merge pull request #15 from amfoss/develop
Changed the otp length to 4
2 parents 398ffbc + 995c058 commit 45a9ae7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/routes/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def send_otp(email: str, db: Session = Depends(get_db)):
3232
if not user:
3333
raise HTTPException(status_code=404, detail="User not found")
3434

35-
otp_code = ''.join(random.choices(string.digits, k=6))
35+
otp_code = ''.join(random.choices(string.digits, k=4))
3636
expiry = datetime.utcnow() + timedelta(minutes=5)
3737

3838
crud.create_or_update_otp(db, email, otp_code, expiry)

0 commit comments

Comments
 (0)