Skip to content

Comments

feat(auth): add Google Sign-In authentication and improve password validation during registration#1410

Open
puneeth-webdev218 wants to merge 7 commits intoidurar:masterfrom
puneeth-webdev218:feat/google-auth
Open

feat(auth): add Google Sign-In authentication and improve password validation during registration#1410
puneeth-webdev218 wants to merge 7 commits intoidurar:masterfrom
puneeth-webdev218:feat/google-auth

Conversation

@puneeth-webdev218
Copy link

@puneeth-webdev218 puneeth-webdev218 commented Nov 22, 2025

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:
Screenshot 2025-11-22 191307

After :
Screenshot 2025-11-22 191230

Checklist

  • I have tested these changes
  • I have updated the relevant documentation
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the codebase
  • My changes generate no new warnings or errors
  • The title of my pull request is clear and descriptive

Your Name added 7 commits November 15, 2025 03:58
- 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
Copy link

@Pratikshit26 Pratikshit26 left a comment

Choose a reason for hiding this comment

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

Check resolved url .Seems

Copy link

@Pratikshit26 Pratikshit26 left a comment

Choose a reason for hiding this comment

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

Node dependecies are still pending dues over the NODE VERSION NEEDS Updation

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.

2 participants