VictorKwong / DataSense-PRJ666-team-5

https://prj666deploy-9xd1.vercel.app
MIT License
0 stars 0 forks source link

Use Case 11: User Registration via Email and Password #19

Closed VictorKwong closed 1 month ago

VictorKwong commented 1 month ago

User Registration via Email and Password

User Story

As a user, I want to create an account using my email and password so that I can securely access the platform and my sensor data.

Description

This use case involves implementing a user registration process where users can sign up with an email and password. After registration, the user will receive a confirmation email with a link to verify their account. The server will validate user input, store the data securely, and ensure the user confirms their email before accessing the platform. Sensitive information, such as passwords, must be encrypted and stored following best practices.

Acceptance Criteria

Testing

Normal Flow of Events

The user navigates to the registration page. The user enters a valid email and password. The system validates the inputs and stores the user's information securely in the database. A confirmation email is sent to the user with a verification link. The user clicks on the verification link, and their account is activated. The user is redirected to the login page, where they can now access the platform.

Alternate/Exceptional Flows:

S-1: User does not confirm the registration email

The user does not click on the confirmation link, and their account remains inactive. The user cannot log in until they confirm their email.

S-2: Invalid email or password format

The user enters an invalid email or password. The system displays an error message explaining the validation failure and prevents registration.

S-3: Failure to send confirmation email

The system fails to send the confirmation email due to server issues. The system displays an error message and prompts the user to try again later.

zhifenli commented 1 month ago
  1. A registration page is created where users can enter their email and password.
  2. Email and password inputs are validated: The email must contain @ and be in a valid format.
  3. The password must contain at least one number, one special character, one uppercase letter, one lowercase letter, and be at least 8 characters long.
  4. User data is securely stored in the user table with encrypted passwords.
  5. Proper error messages are displayed for invalid input or failure to send the confirmation email.