Skip to content

feat: Add complete user authentication system#259

Open
kris70lesgo wants to merge 1 commit intoTanmayKalra09:mainfrom
kris70lesgo:auth
Open

feat: Add complete user authentication system#259
kris70lesgo wants to merge 1 commit intoTanmayKalra09:mainfrom
kris70lesgo:auth

Conversation

@kris70lesgo
Copy link

🚀 Pull Request

📋 Description

This PR implements a comprehensive user authentication system for SmartLog, enabling individual users to create accounts and securely access their personal expense tracking data.

Key Features Added:

  • User Registration: Complete signup flow with form validation
  • User Login: Secure authentication with JWT tokens
  • Protected Routes: Dashboard and expense tracking features now require authentication
  • Password Security: Bcrypt hashing with salt rounds
  • Token Management: Access/refresh token system with HTTP-only cookies
  • Persistent Login: Users stay logged in across browser sessions
  • Error Handling: Comprehensive validation and user feedback
  • Loading States: Improved UX with loading indicators

Fixes #189

🔍 Type of Change
New feature ✨

Refactoring or code improvement ♻️
Other (please describe):

🙋 Your Details
Name: Agastya khati
Email ID: krishkhati70@gmail.com

🧪 How Has This Been Tested?
Backend Testing:

✅ User registration API endpoint (POST /api/v1/users/sign-up)
✅ User login API endpoint (POST /api/v1/users/sign-in)
✅ User logout API endpoint (POST /api/v1/users/logout)
✅ JWT token generation and validation
✅ Password hashing and verification
✅ Protected route middleware functionality

Frontend Testing:

✅ Registration form with validation (password matching, required fields)
✅ Login form with loading states and error handling
✅ Protected route redirection (unauthenticated users redirected to login)
✅ Authentication context state management
✅ Persistent login across page refreshes
✅ Logout functionality clearing user session
✅ Toast notifications for user feedback

Integration Testing:
✅ Complete user journey: Register → Login → Access Dashboard → Logout
✅ Authentication persistence across browser tabs
✅ Proper error handling for invalid credentials
✅ Form validation and user feedback

@vercel
Copy link

vercel bot commented Aug 20, 2025

@kris70lesgo is attempting to deploy a commit to the Tanmay Kalra's projects Team on Vercel.

A member of the Team first needs to authorize it.

@kris70lesgo
Copy link
Author

@TanmayKalra09 can u review it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add User Authentication (Signup/Login functionality)

1 participant