Prerequisites
Install the gcloud CLI:Setup Process
Select Google Cloud Project
OAuth Init fetches your Google Cloud projects using the gcloud CLI and displays them for selection.The currently active project (from
gcloud config get-value project) will be marked as “(Default)”.If no projects are found, create one at Google Cloud Console.Configure OAuth Consent Screen
OAuth Init opens the OAuth consent screen configuration page:Complete these steps in the Google Cloud Console:
Google requires manual setup for personal projects.
- Choose External as the user type
- Fill in the App Name and User support email
- Click Save and Continue through all remaining screens
Create OAuth Client ID
OAuth Init opens the OAuth client creation page:Complete these steps:
- Select Web Application as the application type
- Add your Redirect URIs (your application’s callback URLs)
- Click Create
Enter Credentials
Paste your credentials when prompted:Client ID:Client Secret:
The Client ID must contain
.apps.googleusercontent.com to be valid.Save Credentials
Choose where to save your credentials:
.env- Save to.envfile in your project root.env.local- Save to.env.localfile (ideal for Next.js projects).json- Save togoogle-credentials.jsonfileprint to the console- Display credentials in terminal without saving
Validation Rules
OAuth Init validates the Google Client ID format:.apps.googleusercontent.com to pass validation.
Automated Checks
OAuth Init performs the following checks:- gcloud CLI Installation - Verifies
gcloud versioncommand succeeds - Authentication Status - Checks for active authenticated accounts using:
- Project Access - Fetches available projects to ensure proper access