LookUpGroup27 / LookUp

0 stars 1 forks source link

feat: implement login, register, and password reset flows #161

Closed othbcq closed 1 day ago

othbcq commented 2 days ago

This PR adds the complete implementation of login, registration, and password reset functionalities, including UI, ViewModels, repositories, and tests. The navigation flow has also been updated to integrate these features. Below is a summary:

Changes:

  1. Login Feature:

    • LoginScreen: Email/password input fields with navigation to password reset.
    • LoginViewModel: Handles state and Firebase interactions.
    • LoginRepositoryFirestore: Implements Firebase-based authentication.
    • Tests: Added unit/UI tests for repository, ViewModel, and UI.
  2. Register Feature:

    • RegisterScreen: Email/password fields for new user registration.
    • RegisterViewModel: Manages registration logic and state.
    • RegisterRepositoryFirestore: Handles Firebase-based user creation.
    • Tests: Added unit/UI tests for repository, ViewModel, and UI.
  3. Password Reset Feature:

    • PasswordResetScreen: Allows users to send reset emails.
    • PasswordResetViewModel: Handles state and repository calls.
    • PasswordResetRepositoryFirestore: Integrates with Firebase for reset emails.
    • Tests: Added unit/UI tests for repository, ViewModel, and UI.
  4. Navigation Updates:

    • Integrated new screens into NavigationActions and MainActivity.
  5. Sign-In Refactor:

    • Enhanced SignIn composable with login, register, and password reset navigation buttons.
sonarcloud[bot] commented 2 days ago

Quality Gate Failed Quality Gate failed

Failed conditions
12.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

othbcq commented 1 day ago

I am closing this PR as it aligns with the issue I recently closed, which was too large in scope and included multiple functionalities. To better manage the development and tracking, I have split the implementation into three separate issues:

  1. #169 - Implement Registration Flow: Dedicated to the functionality for users to create new accounts with proper validation and UI.
  2. #170 - Implement Login Flow: Focused on enabling secure user login with email/password and handling errors for invalid credentials.
  3. #172 - Implement Password Reset Flow: Allows users to recover their accounts via a password reset email, with proper success/error feedback.

I will create smaller, focused PRs for each of these functionalities corresponding to their respective issues. This will improve clarity, maintainability, and reviewability for each feature. Closing this PR in favor of the new approach.