Skip to content

Implement OTP Creation Service for User Authentication using Redis #2

@Prathamesh-007

Description

@Prathamesh-007

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions