Skip to content

Fix : Standardized the login , signup , and googleLogin functions in …#1201

Open
prajapatideepak2370 wants to merge 1 commit into
aryandas2911:mainfrom
prajapatideepak2370:main
Open

Fix : Standardized the login , signup , and googleLogin functions in …#1201
prajapatideepak2370 wants to merge 1 commit into
aryandas2911:mainfrom
prajapatideepak2370:main

Conversation

@prajapatideepak2370
Copy link
Copy Markdown

@prajapatideepak2370 prajapatideepak2370 commented May 27, 2026

…authController.js to use the same JWT algorithm ( HS256 by default) and expiration settings

📌 Description

Implemented major authentication and reliability improvements across the application, including standardized JWT token generation and expiration handling, consistent MongoDB ObjectID processing, and Firebase token validation with clock-skew tolerance. Enhanced timeout and error handling by increasing Axios request limits, improving middleware error responses, and adding user-friendly timeout messages in login/signup pages. Also configured backend and frontend environment setup with .env files and verified successful database connection and frontend startup on port 5173.

🔗 Related Issue

Closes #1200

🛠 Changes Made

  • Standardized JWT authentication across login, signup, and Google login.
  • Fixed MongoDB ObjectID handling using .toString() for consistent token verification.
  • Added 5-minute leeway for Firebase token expiration to avoid clock mismatch errors.
  • Increased Axios request timeout to 60 seconds to handle server cold starts.
  • Improved error messages for login, signup, and auth middleware.
  • Updated frontend to show clearer timeout/loading feedback to users.

✅ Checklist

  • Code runs locally
  • Followed project structure
  • No console errors
  • Properly tested changes
  • Linked the issue

🚀 Notes for Reviewers

Anything specific you want reviewed.

…authController.js to use the same JWT algorithm ( HS256 by default) and expiration settings
@prajapatideepak2370
Copy link
Copy Markdown
Author

Fix : Standardized the login , signup , and googleLogin functions

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.

User Signup problem

1 participant