feat(auth): add Google Sign-In authentication and improve password validation during registration#1410
Open
puneeth-webdev218 wants to merge 7 commits intoidurar:masterfrom
Open
Conversation
added 7 commits
November 15, 2025 03:58
…; frontend GSI button and flow)
- Enforce strong password validation on frontend and backend (8+ chars, uppercase, lowercase, number, special char) - Implement Google Sign-In using Google Identity Services - Add Google token verification on backend using google-auth-library - Create user automatically on first Google login - Add isGoogleUser and googleId fields to Admin model - Create /api/google endpoint for Google authentication - Add googleAuth controller and verifyGoogleToken utility - Integrate Google OAuth with existing Redux auth flow - Fix Login page browser compatibility for Chrome/Edge/Firefox - Add conditional Google button rendering based on client ID - Improve error handling and script management - Create comprehensive documentation and testing guides
…icts using improved code
Pratikshit26
approved these changes
Feb 16, 2026
Pratikshit26
left a comment
There was a problem hiding this comment.
Node dependecies are still pending dues over the NODE VERSION NEEDS Updation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces enhancements to the authentication module:
🔹 Integrated Google Identity Services (GSI) to enable Sign-In with Google
🔹 Implemented automatic user creation for first-time Google users
🔹 Added strong password validation (minimum security rules) during registration
🔹 Added confirm-password verification to ensure password match
🔹 Maintains backward compatibility with existing email/password login
These updates significantly improve the security and user experience of the registration and login workflow.
Related Issues
This pull request addresses the issue: #1304
Steps to Test
Navigate to the login page
Click "Sign in with Google"
Select a Google account
Expected result:
User is successfully logged in
New Google users are auto-created and redirected to dashboard
Returning Google users are logged in instantly
🔹 Password Validation
Go to Register
Try weak passwords like: 123, password, abcdef, Admin123 → ❌ Should be prevented
Try a strong password like: Abcd@1234 → ✔ Should be accepted
🔹 Confirm Password
Enter two different passwords
Expected result → ❌ Should show "Passwords do not match"
Enter matching passwords → ✔ Form should submit
Screenshots (if applicable)
Before:

After :

Checklist