-
Notifications
You must be signed in to change notification settings - Fork 25
Labels
Description
Overview
Implement a service to generate and manage One-Time Passwords (OTPs) for user authentication. Use Redis for fast and temporary OTP storage to ensure secure and efficient verification.
Requirements
- Create a service that generates numeric OTPs (e.g., 6 digits).
- Store OTPs in Redis with a configurable expiration time (e.g., 5 minutes).
- Ensure OTPs can be associated with user identifiers (such as email or phone number).
- Provide methods to create, validate, and delete OTPs.
Acceptance Criteria
- OTPs are securely created and stored in Redis.
- Expired OTPs are not valid and are automatically removed from Redis.
- Service exposes clear methods for OTP creation, validation, and deletion.
Additional Notes
- Use environment variables for Redis connection configuration.
Feel free to discuss or suggest improvements for the OTP creation and authentication workflow.