Debugging Google OAuthentication and Adding connection to supabase - #69
Debugging Google OAuthentication and Adding connection to supabase#69MayankRai89 wants to merge 21 commits into
Conversation
…n and skill definition files.
…trollers, and integration tests
…e, routes, and UI components
…rvice, and dashboard view
…acking, streak management, and calendar export functionality
…ing, and iCalendar export functionality
…and iCal generation support
… navigation, modals, and tab switching functionality
…heduling, completion tracking, and calendar integration
…ient-side JavaScript functionality
…are, friend management controllers, and dashboard views with testing support.
…on, OAuth support, and database initialization on startup
|
@MayankRai89 is attempting to deploy a commit to the arpit2006's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
🎉 Thank you @MayankRai89 for submitting a Pull Request! We're excited to review your contribution. Before Review✅ Ensure all CI checks pass 📖 Before your PR is reviewed, check the PR Checklist in our Contributing Guide. Happy Contributing! 🚀 |
📏 Pull Request Size Report🔴 Classification: Huge
Size Meter
Recommendation🚨 This PR is very large. Splitting it into multiple PRs is strongly recommended. Generated automatically by PR Size Analyzer. |
👋 Welcome Back!Hi @MayankRai89, Thanks for contributing to CampusCompass again! We appreciate your continued support ❤️ 🗄 Database ChangesPlease Verify
🌟 General Tips
Happy Coding! 🚀 Generated automatically by Contributor Learning Assistant. |
📋 Pull Request Preview📊 Summary
📂 File Breakdown
⏱️ Estimated Review Time147 minute(s) ✅ Reviewer Checklist
|
🛡️ Critical File Change DetectorThis Pull Request modifies important project files. Changed Files• .agents/skills/supabase-postgres-best-practices/references/security-privileges.md (Security) Labels Added🏷️ Reviewer Checklist
Generated automatically by Critical File Change Detector. |
|
…vices, scripts, and tests
Description
This pull request improves user authentication reliability, integrates the official Google Identity Services (GIS) SDK on login/registration pages, resolves a token verification mismatch in the authentication controller, and establishes immediate database connection logging on application startup.
Key Changes:
Google Identity Services Integration:
https://accounts.google.com/gsi/client) intoviews/login.ejsandviews/register.ejs.handleGoogleCredentialResponse) to submit genuine ID tokens to/auth/google.OAuth Token Verification Fix:
controllers/authController.jswith smart token inspection (token.split('.').length === 3) to verify genuine Google JWTs withOAuth2Client.verifyIdToken()while safely decoding mock/development payloads without throwingWrong number of segments in tokenerrors.req.session.save()before performing redirect responses.Startup Database Connection:
app.jsto initialize and synchronize the Sequelize connection (Supabase / SQLite) immediately on server boot outside serverless environments, providing immediate feedback in console logs.Related Issue
Type of Change
How Has This Been Tested?
npm testacross the full test suite (test/**/*.test.js) — 43 / 43 tests passing (100%)./auth/googlewith both Google JWT and developer mock payloads, verifying successful user creation/login and redirect to/dashboard//profile/setup.Checklist: