Skip to content

Best practices for OTP-based login & downloading files? #255

Answered by animir
deadcoder0904 asked this question in Q&A
Discussion options

You must be logged in to vote

@deadcoder0904 Hi

  1. I usually allow 10 attempts for email-based login and then block for 15 minutes.
  2. OTP-based verification should allow no more than 3 attempts. After the third attempt a new OTP should be sent.
  3. To decide what rate limit should be on the Download a file endpoint, you should analyze your files. There is no best practice, but understanding what your server should and can handle if somebody tries to DDoS it with many file downloads. You can also limit by the total size of files user can download per hour/day.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@deadcoder0904
Comment options

@animir
Comment options

@deadcoder0904
Comment options

Answer selected by deadcoder0904
Comment options

You must be logged in to vote
1 reply
@deadcoder0904
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants