Skip to content

Draft: feat: Patient Login & Password Reset Flow

Rajuldev Vandana requested to merge patient-login into develop

This MR implements the complete Patient Authentication flow including login and OTP-based password reset.

Features Implemented

Patient login using Book Number + Password

First-time login detection (redirect to set password)

Forgot password flow:

Book number verification

Fetch registered phone number

Send OTP

OTP verification

Set new password & confirm password

Show / Hide password toggle

Improved error messaging (e.g., "Please create your password")

Removed "Create Account" option from patient login

Display only Patient Manual in patient login view

🎯 Why

To provide a secure and complete authentication flow for patients that aligns with backend APIs and improves user experience with a clean, simplified UI.

References

Related Issue: #

API Endpoints:

POST /api/v1/auth/login

POST /api/v1/auth/send-otp

POST /api/v1/auth/forgot-password

Screenshots or screen recordings image image image image

How to set up and validate locally

Checkout the branch:

git checkout patient-login

Install dependencies:

npm install

Start the development server:

npm run dev

Validate:

Open /login

Switch to Patient Login

Test login with valid credentials

Click Forgot password

Enter book number

Verify registered phone number

Send OTP

Reset password

Login again with new password

Run tests:

npm run test

All tests pass successfully.

Edited by Rajuldev Vandana

Merge request reports

Loading