swarooppatilx / scruter

Scruter is a local classifieds and community site designed to bring people together for buying, selling, and exchanging goods and services.
https://scruter.vercel.app
GNU General Public License v3.0
28 stars 135 forks source link

[Feat] 🚀 Issue: Seller Login Implementation – Frontend & Backend #347

Closed ShivanshPlays closed 3 weeks ago

ShivanshPlays commented 3 weeks ago

Description

đź“ť Description

This issue tracks the complete implementation of the Seller Login functionality, covering both frontend pages and backend logic. The seller login will follow a secure OTP-based email verification process to ensure valid login.


đź“Ś Key Objectives

  1. Frontend Pages and Forms

    • Create the Seller Login Form to collect the seller's email.
    • Upon form submission, make a request to the backend to generate an OTP and send it to the provided email address.
    • Implement a second form to input the OTP received via email for verification.
    • Ensure smooth user experience with appropriate success and error messages.
  2. OTP-based Email Verification

    • Generate a 6-digit OTP and send it to the seller’s email upon login request.
    • Create a reusable email utility function to handle OTP email sending using Nodemailer.
    • Ensure proper error handling for email delivery issues (e.g., invalid email or delivery failure).
  3. Backend Server Actions

    • Implement server-side logic to handle the OTP generation and verification process.
    • Develop API routes to:
      • Send an OTP to the email address after login is requested.
      • Verify the OTP submitted by the user.
      • Establish a session if the OTP verification is successful.
    • Handle edge cases (e.g., expired OTPs, incorrect OTPs).

Screenshots

No response

Checklist

Screenshots

No response

Checklist