Skip to content

feat(forgot-password): forgot password - [CU-869aqfgqb] - #37

Merged
mostafahassan04 merged 26 commits into
devfrom
feat/forget-password
Oct 28, 2025
Merged

feat(forgot-password): forgot password - [CU-869aqfgqb]#37
mostafahassan04 merged 26 commits into
devfrom
feat/forget-password

Conversation

@mostafahassan04

Copy link
Copy Markdown
Collaborator

This pull request implements a complete refactor and redesign of the authentication and password reset flows in the application. It introduces new Vue components for each step of the password reset process, updates the login and password forms to use improved validation and error handling, and adds new service layers for login and password management. The changes focus on improving UX, code maintainability, and validation accuracy.

Authentication flow improvements

  • Updated IdentifierStep.vue and PasswordStep.vue to use stricter field validation with yup, improved error handling via toasters, and dynamic button states based on form validity. The forms now validate on change and disable submission when invalid or submitting. Also, error display logic was simplified and UI text was updated for clarity. [1] [2] [3] [4] [5] [6] [7]

  • Refactored FieldPassword.vue to support dynamic field names and placeholders, and to display validation error messages directly below the input. [1] [2]

Password reset flow implementation

  • Added new components for each step of the password reset process: FindAccount.vue for user identification, SentCode.vue for OTP verification, and ChooseNewPassword.vue for setting a new password. Each uses strong validation, disables submission when invalid, and provides clear error feedback. [1] [2] [3]

  • Created a new password reset page (password-reset/index.vue) that orchestrates the multi-step dialog, manages dialog state, and integrates the new components.

Service layer additions

  • Added loginService.ts for checking user existence and performing login, and passwordService.ts for handling password reset flows (user check, OTP verification, resend OTP, and password reset). These abstract API calls and improve separation of concerns. [1] [2]

@AhmedAmrNabil

Copy link
Copy Markdown
Collaborator

Task linked: CU-869aqfgqb Forget password

@AhmedAmrNabil AhmedAmrNabil left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work Hassan :)

Comment thread app/components/auth/login/PasswordStep.vue Outdated
Comment thread app/components/auth/login/IdentifierStep.vue Outdated
Comment thread app/pages/password-reset/index.vue
Comment thread app/pages/password-reset/index.vue
Comment thread app/components/auth/password/FindAccount.vue Outdated
Comment thread app/services/auth/loginService.ts Outdated
Comment thread app/stores/auth/login.ts Outdated
Comment thread app/stores/auth/password.ts Outdated
Comment thread i18n/locales/en.json Outdated
Comment thread mocks/handlers/password.ts Outdated
AhmedAmrNabil
AhmedAmrNabil previously approved these changes Oct 26, 2025
@AmrSamy59

Copy link
Copy Markdown
Member

Why is the PR huge like that?
+3,829 −514

@github-actions

Copy link
Copy Markdown

Testers Checklist

General

  • Validation for every input
  • Persistent try/catch blocks
  • No lack of documentation
  • Localization

Frontend

  • Caching (if applicable)
  • Responsiveness for all screens
  • Loading indicators & skeleton loaders
  • Optimistic loading (if applicable)
  • No warnings in console

@github-actions

Copy link
Copy Markdown

Unit Tests Coverage Report

Coverage after merging feat/forget-password into dev will be
61.72%
Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
app/components/auth/login
   IdentifierStep.vue90.91%85.71%87.50%95.45%98, 98, 98
   LoginDialog.vue100%100%100%100%
   PasswordStep.vue100%100%100%100%
app/components/auth/password
   ChooseNewPassword.vue100%100%100%100%
   FindAccount.vue100%100%100%100%
   SentCode.vue100%100%100%100%
app/components/auth/register
   OtpForm.vue100%100%100%100%
   PasswordForm.vue100%100%100%100%
app/components/ui/form
   FieldPassword.vue100%100%100%100%
app/pages
   index.vue100%100%100%100%
app/pages/password-reset
   index.vue82.61%71.43%100%100%38, 38, 42, 42
app/schemas
   auth.ts100%100%100%100%
app/services/auth
   loginService.ts100%100%100%100%
   passwordService.ts100%100%100%100%
app/stores/auth
   login.ts95.59%100%87.50%96.08%30–31
   password.ts96.20%100%87.50%96.72%26–27
server/api/auth
   check-identifier.get.ts100%100%100%100%
   login.post.ts100%100%100%100%
server/api/auth/password
   resend-otp.post.ts100%100%100%100%
   reset.post.ts100%100%100%100%
server/api/auth/password/forgot
   index.post.ts100%100%100%100%
   verify.post.ts100%100%100%100%

@mostafahassan04
mostafahassan04 merged commit 2093ba7 into dev Oct 28, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants