Skip to main content

Use Existing gcloud Auth

Already logged in with gcloud? The desktop app picks it up.


How It Works

If you've already run gcloud auth application-default login, the desktop app detects your Application Default Credentials (ADC) and uses them for BigQuery. No sign-in needed.

Useful if you already use gcloud daily.


Setup

Option 1: You Already Have ADC

If you've previously run gcloud auth application-default login, the desktop app detects it on launch.

Option 2: Set Up ADC Now

# Install gcloud CLI (if not installed)
brew install google-cloud-sdk

# Log in with application-default credentials
gcloud auth application-default login

This opens a browser window for Google consent. Once approved, credentials are saved to ~/.config/gcloud/application_default_credentials.json.


ADC vs OAuth Sign-In

ADC (gcloud)OAuth (Sign in with Google)
Best forDevelopers with gcloud already set upEveryone else
Setupgcloud auth application-default loginClick "Sign in with Google"
Token storage~/.config/gcloud/macOS Keychain
Project selectionUses gcloud's active projectSelect in Querylab.io
Token refreshManaged by gcloudManaged by Querylab.io

The app tries ADC first, then falls back to OAuth.


Switching Projects

When using ADC, the default project comes from your gcloud config:

# Check current project
gcloud config get-value project

# Switch project
gcloud config set project my-other-project

You can also switch projects inside Querylab.io regardless of which auth method you use.


Troubleshooting

ADC Not Detected

# Verify ADC exists
cat ~/.config/gcloud/application_default_credentials.json

If the file doesn't exist, run gcloud auth application-default login again.

Expired Credentials

# Re-authenticate
gcloud auth application-default login

Wrong Project

# Set the correct project
gcloud config set project your-project-id

Then restart Querylab.io Desktop.