Skip to content

feat: Add Google & GitHub Authentication and fix backend stability issues#370

Open
Dev1822 wants to merge 5 commits into
anubhavxdev:mainfrom
Dev1822:feature/google-auth
Open

feat: Add Google & GitHub Authentication and fix backend stability issues#370
Dev1822 wants to merge 5 commits into
anubhavxdev:mainfrom
Dev1822:feature/google-auth

Conversation

@Dev1822
Copy link
Copy Markdown

@Dev1822 Dev1822 commented Jun 1, 2026

Closes #357

Overview

This PR introduces third-party OAuth support by integrating both Google and GitHub authentication into the Sign-In and Sign-Up flows. It also resolves a series of critical backend syntax errors and misconfigurations that were causing the server to crash on startup.

Key Changes

🌟 Features

  • Google Authentication: Integrated @react-oauth/google to allow users to sign up and log in using their Google accounts.
  • GitHub Authentication: Built a custom OAuth callback flow to exchange GitHub authorization codes for access tokens.

🐛 Bug Fixes

  • Backend Server Crashes: Repaired severely corrupted files (server.js, socket.js, registrationRoutes.js, etc.) by fixing syntax errors and resolving undefined variable references.
  • Database Connection: Uncommented the connectDB() initialization in server.js.
  • React StrictMode Bug: Implemented useRef flags to prevent React 18's StrictMode from executing the GitHub OAuth callback twice.

Testing Steps

To verify these changes, reviewers should follow these steps:

  1. Ensure the following environment variables are set in .env for the backend: GOOGLE_CLIENT_ID, GITHUB_CLIENT_ID, and GITHUB_CLIENT_SECRET.
  2. Ensure the following environment variables are set in .env for the frontend: VITE_GOOGLE_CLIENT_ID, VITE_GITHUB_CLIENT_ID.
  3. Start both the frontend and backend servers.
  4. Navigate to /signup and attempt to create an account via the "Continue with Google" button. Verify successful redirection and account creation.
  5. Navigate to /login and attempt to sign in via the "Continue with GitHub" button. Verify successful sign-in.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@Dev1822 is attempting to deploy a commit to the anubhav12302387's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

✅ PR Format Check — Passed

Hi @Dev1822! Your PR passed all automated checks and is now queued for mentor review. 🎉

✅ Checks Passed

  • Conventional Commits title format ✓
  • Issue linked ✓
  • Description length sufficient ✓
  • Valid feature branch ✓

📋 EventOne PR Guidelines (click to expand)

Title format — Conventional Commits:
feat: · fix: · docs: · style: · refactor: · test: · chore: · perf:

Always link an issue: Closes #number

Use a feature branch — never PR directly from main

Write your own description — AI-generated content = gssoc:ai-slop label

EventOne × GSSoC Pipeline — Stage 1 Automated Check

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

👋 Thanks for opening a PR, @Dev1822!

Your PR has entered the 🎯 EventOne GSSoC PR Review Pipeline.

🟢 GSSoC PR detected — your PR will be routed to an approved GSSoC mentor for Stage 2 review.

What happens next

Stage Reviewer Checks
Stage 1 — Automated Validation 🤖 Bot Title format · Issue link · AI Slop · Branch check
Stage 2 — Mentor Review 🧑‍🏫 GSSoC Mentor Code + Quality Review
Stage 3 — Admin Final Gate 🔑 @anubhavxdev Label check + Final Merge Decision

A pipeline status comment will appear below and update automatically as your PR progresses.


While you wait

  • Sign all commits using git commit -s
  • Link your issue with Closes #123
  • Use a feature branch — not main
  • Avoid unrelated changes in the same PR
  • Write your own description — no AI-generated content

This comment is posted only once.

EventOne × GSSoC Automated Pipeline

@github-actions github-actions Bot added gssoc:review GSSoC: Under review stage-1-approved Pipeline: Stage 1 automated checks passed labels Jun 1, 2026
@Dev1822
Copy link
Copy Markdown
Author

Dev1822 commented Jun 5, 2026

Hello @anubhavxdev , It has been 4 days since I have created this PR. Kindly give me any update on this or suggest me any changes if needed.

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

Labels

gssoc:review GSSoC: Under review stage-1-approved Pipeline: Stage 1 automated checks passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add Google Authentication to Sign In / Sign Up

1 participant