Use case: User registration and login - bounswe/bounswe2023group4 GitHub Wiki

Use case: User registration/login (UC-UR)

Primary actor: User

Goal in context: To register a new account or login to an existing account in the Prediction Polls app.

Preconditions:

  • The Prediction Polls app is installed and functioning properly on the user's device or the app is accessible via a web browser.
  • The user has internet access.
  • The user is not logged in or registered in the app (for the registration flow).

Trigger: User opens the Prediction Polls app and selects the login/registration page.

Scenario:

  • The app displays the login/registration page.
    • If the user selects the "Register" option:
      1. The app displays the registration form.
      2. The user fills out the registration form, including name, email address, and password.
      3. The user submits the registration form.
      4. The app verifies the email address is not already registered.
      5. If the email address is not already registered, the app creates a new account for the user and logs them in automatically.
      6. If the email address is already registered, the app displays an error message and prompts the user to either try again with a different email address or login with their existing account.
    • If the user selects the "Login" option:
      1. The user enters their email address and password.
      2. The user selects the "Login" button.
      3. The app verifies the email address and password are correct.
      4. If the email address and password are correct, the app logs the user in and displays the home page.
      5. If the email address and password are incorrect, the app displays an error message and prompts the user to try again. The user can either enter their login credentials again or select the "forgot password" option to reset their password.

Exceptions:

  • If the user provides incorrect login credentials:
    1. The app displays an error message and prompts the user to try again.
    2. The user can either enter their login credentials again or select the "forgot password" option to reset their password.
  • If the user tries to register with an email that is already registered:
    1. The app displays an error message and prompts the user to either try again with a different email address or login with their existing account.

Priority: High

When available: First Increment

Frequency of use: Often

Channels to actor: Mobile device or web browser with internet access.