Hi everyone π Hereβs a new update on the ongoing eCommerce project. Follow me on twitter to get more real time updatesπ₯ Twitter account: x.com/ishahriarsajeeb
π οΈ 1. User Registration with OTP Verification β React Hook Form for client-side validation. β TanStack Query for managing mutations (API requests) and handling loading/error states. β Users must verify their email via OTP before completing registration. β OTP is sent to the userβs email upon registration. β If OTP is correct, the user is successfully registered in the database. β If OTP is wrong, the user gets a warning (with limited attempts).
π‘οΈ 2. Strong Anti-Spam & Security Mechanisms β 1-minute cooldown β³ between OTP requests to prevent spamming. β Maximum 3 OTP requests per hour β if exceeded, email is locked for 1 hour. π β Account lock for 30 minutes π after 3 incorrect OTP attempts. β OTP expires in 5 minutes β forcing users to use it quickly. β Duplicate accounts prevention β No two users can have the same email.
π 3. Protection Against Brute Force & Repeated Requests β Failed OTP attempts are tracked (max 3 tries). β After 3 wrong OTP entries, the account is locked for 30 minutes. β Prevents attackers from guessing OTPs repeatedly. β Email OTP request tracking: - More than 3 OTP requests within an hour Email is blocked for 1 hour. - Prevents bots from abusing the email system.
β»οΈ 5. Full User Registration Flow 1οΈβ£ User submits name, email, and password. 2οΈβ£ System sends OTP to the email. 3οΈβ£ User enters OTP. 4οΈβ£ If OTP is correct β β Account is created. π 5οΈβ£ If OTP is wrong β β User gets limited retries. 6οΈβ£ If wrong OTP entered 3 times, account is locked for 30 mins. 7οΈβ£ If OTP requested too many times, email is blocked for 1 hour.
This system is built for real-world authentication with the best security measures in place! πͺ
What do you think? Would you add any more features?
Becodemy
Hi everyone π Hereβs a new update on the ongoing eCommerce project. Follow me on twitter to get more real time updatesπ₯
Twitter account: x.com/ishahriarsajeeb
π οΈ 1. User Registration with OTP Verification
β React Hook Form for client-side validation.
β TanStack Query for managing mutations (API requests) and handling loading/error states.
β Users must verify their email via OTP before completing registration.
β OTP is sent to the userβs email upon registration.
β If OTP is correct, the user is successfully registered in the database.
β If OTP is wrong, the user gets a warning (with limited attempts).
π‘οΈ 2. Strong Anti-Spam & Security Mechanisms
β 1-minute cooldown β³ between OTP requests to prevent spamming.
β Maximum 3 OTP requests per hour β if exceeded, email is locked for 1 hour. π
β Account lock for 30 minutes π after 3 incorrect OTP attempts.
β OTP expires in 5 minutes β forcing users to use it quickly.
β Duplicate accounts prevention β No two users can have the same email.
π 3. Protection Against Brute Force & Repeated Requests
β Failed OTP attempts are tracked (max 3 tries).
β After 3 wrong OTP entries, the account is locked for 30 minutes.
β Prevents attackers from guessing OTPs repeatedly.
β Email OTP request tracking:
- More than 3 OTP requests within an hour Email is blocked for 1 hour.
- Prevents bots from abusing the email system.
π§ 4. OTP Management & Delivery System
β OTPs are randomly generated (4-digit codes).
β OTPs are sent via email using an automated system. π©
β Redis temporarily stores OTPs for validation (auto-expires in 5 mins).
β Users can resend OTPs, but only within security limits.
β»οΈ 5. Full User Registration Flow
1οΈβ£ User submits name, email, and password.
2οΈβ£ System sends OTP to the email.
3οΈβ£ User enters OTP.
4οΈβ£ If OTP is correct β β Account is created. π
5οΈβ£ If OTP is wrong β β User gets limited retries.
6οΈβ£ If wrong OTP entered 3 times, account is locked for 30 mins.
7οΈβ£ If OTP requested too many times, email is blocked for 1 hour.
This system is built for real-world authentication with the best security measures in place! πͺ
What do you think? Would you add any more features?
7 months ago | [YT] | 107