Interview practice question
Storing one-time passwords
Backend Engineering · NoSQL and Redis · Beginner
Design how you would store and verify one-time passwords (OTPs) for login using Redis.
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Key per user/phone with OTP and TTL (e.g. 5 min).
- Store hash, not plain OTP.
- Limit attempts with counter.
- Delete after successful use.
- Rate limit OTP sends.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.