Skip to content

Conversation

Kaidama97
Copy link

Feature Overview

Added email-based OTP (One-Time Password) verification system for user registration, ensuring users verify their email addresses before account activation.

Key Features

OTP Generation & Management

  • 6-digit OTP generation with configurable length
  • 5-minute expiration with configurable TTL
  • Redis-based storage for scalable OTP management
  • Attempt limiting (5 max attempts) to prevent brute force
  • Rate limiting to prevent spam (configurable per user)

API Endpoints

  • POST /auth/send-verification-otp - Generate and send OTP to user email
  • POST /auth/verify-otp - Verify OTP and activate user account
  • GET /auth/verification-status - Check current verification status

Database Changes

  • isVerified field added to user model

close: #7

- Add centralized error handling system for auth, user, and validation errors
- Implement OTP generation, storage, and verification using Redis
- Add email service with Mailtrap integration for OTP delivery
- Create registration flow with email verification requirement
- Add rate limiting for authentication attempts
@Kaidama97 Kaidama97 added this to the Milestone D2 milestone Sep 19, 2025
@Kaidama97 Kaidama97 self-assigned this Sep 19, 2025
@Kaidama97 Kaidama97 added priority: High feature For requests or issues adding new functionality labels Sep 19, 2025
Copy link

@zeotheburrito zeotheburrito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature For requests or issues adding new functionality priority: High
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add OTP Authentication to User Service with Amazon SES Email Integration
2 participants