AyushKumar123456789 / stock-analysis-backend

Backend of stock analysis of project
2 stars 2 forks source link

Add Email Validations #1

Closed AyushKumar123456789 closed 1 month ago

AyushKumar123456789 commented 1 month ago

GitHub Issue: Add Email Validation Method for User Registration


Title: Add Email Validation Method for User Registration

Description: We need to enhance our user registration process by implementing email validation. This will ensure that users provide a valid email address when registering, which is essential for communication and account recovery purposes.

Requirements:

  1. Implement email validation to check for proper email format.
  2. You can write a parsing function for email validation or use api for OTP varification.
  3. Error Message should be desplayed when email is not correct.

Acceptance Criteria:

Additional Information:

Tasks:

  1. Backend:

    • [ ] #6
    • [ ] Add error handling for duplicate emails.
    • [ ] Write unit tests for email validation.
  2. Frontend:

    • [ ] Add client-side validation for the email field.
    • [ ] Display appropriate error messages for invalid or duplicate emails.
    • [ ] Update the form submission logic to include email.

I am still writing the tests for it


cprakash1 commented 1 month ago

Hi Developer, I will do this task. But let me get clarity , There are two ways to get email validated

  1. Used by beginners i.e. you will get otp and once you entered otp you will get validated
  2. Used by corporates is they send you link on email and as you click on link you get verified.

So I want to know your usecase

AyushKumar123456789 commented 1 month ago

Hi cprakash1,

Thank you for your interest in contributing to this task!

For this project, we will use the second method, which is commonly used by corporates. Specifically, we will:

  1. Send a Verification Link via Email: After a user registers, we will send an email containing a verification link to the email address they provided.
  2. Verify on Click: When the user clicks on the verification link, they will be redirected to our site, where their email will be verified.

This approach ensures that the user has access to the provided email address and aligns with standard practices for secure email validation.

I am assigning this issue to you. If you have any further questions or need additional details, please feel free to ask.

Thank you for your contribution!

Best regards, Ayush Kumar