Skip to content

fix(auth): initialize googleClient for Google OAuth verification#115

Open
Aditya30ag wants to merge 1 commit into
mayo-byte07:mainfrom
Aditya30ag:fix/google-oauth-client-init
Open

fix(auth): initialize googleClient for Google OAuth verification#115
Aditya30ag wants to merge 1 commit into
mayo-byte07:mainfrom
Aditya30ag:fix/google-oauth-client-init

Conversation

@Aditya30ag
Copy link
Copy Markdown

Description

Fixes #114

This PR fixes a runtime error occurring during Google OAuth authentication where googleClient was referenced before being initialized in server.js.

The issue caused the /api/auth/google endpoint to fail with:

ReferenceError: googleClient is not defined

The fix initializes googleClient using OAuth2Client and the configured GOOGLE_CLIENT_ID environment variable.

Changes Made

  • Added initialization for googleClient in server.js
  • Configured OAuth2Client using process.env.GOOGLE_CLIENT_ID
  • Fixed Google OAuth token verification flow
  • Validated server syntax using node -c server.js

Screenshots (if applicable)

N/A

Checklist

  • I have linked the relevant issue above.
  • I have tested my changes locally.
  • My code follows the project's style guidelines.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 28, 2026

@Aditya30ag is attempting to deploy a commit to the Mayo's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

[BUG] ReferenceError: googleClient is not defined during Google OAuth verification

1 participant