google-cloud-auth

Configure OAuth 2.0, service account JWT, or ADC for Google API authentication.

15|2|Updated May 23, 2026
One-click install
npx skills add https://github.com/VKirill/antigravity-for-claude-code --skill google-cloud-auth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: google-cloud-auth
Source: https://github.com/VKirill/antigravity-for-claude-code/tree/main/skills/google-cloud-auth
Command: npx skills add https://github.com/VKirill/antigravity-for-claude-code --skill google-cloud-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Google Cloud Authentication prevents failed Google API calls by guiding you to the correct credential type and fixing common auth misconfigurations like invalid_grant, missing scopes, and ADC credential discovery errors.

Core Features & Use Cases

  • OAuth 2.0 Authorization Code flow: Set up installed or web app consent with PKCE, handle refresh tokens, and recover from invalid_grant by re-authorizing.
  • Service Account JWT bearer: Authenticate backend jobs with a key.json (or environment/secret injection), enable the required APIs, and grant access at the resource level (optionally with domain-wide delegation).
  • Application Default Credentials (ADC): Use GOOGLE_APPLICATION_CREDENTIALS, gcloud ADC, or GCP metadata/workload identity to avoid managing keys in code.
  • Error diagnosis & recovery: Map 401/403/429/token endpoint errors to the right fixes (refresh vs re-consent vs enable API vs scope/resource permissions).

Quick Start

Use the google-cloud-auth skill to pick the correct auth method for your target API, then follow its referenced setup instructions to obtain valid credentials and minimum scopes for the task you’re running.

Frequently Asked Questions about google-cloud-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix the invalid_grant error when refreshing Google OAuth 2.0 tokens?

To resolve the invalid_grant error during Google OAuth 2.0 token refresh, you must trigger a re-authorization flow and verify your refresh token lifecycle management. This error typically indicates expired or revoked access requiring fresh user consent.

When should I use Application Default Credentials instead of a Service Account key file?

Use Application Default Credentials (ADC) for local and GCP environments to avoid managing service account key.json files in code. ADC leverages gcloud setup, GOOGLE_APPLICATION_CREDENTIALS, or GCP metadata workload identity for secure, automatic credential resolution.

How do I set up OAuth 2.0 with PKCE for Google APIs in a public client?

Set up OAuth 2.0 with PKCE for public clients by configuring the authorization code flow with code challenge parameters. This ensures secure authentication for installed or web applications without exposing a client secret during the token exchange.

Why does my Google API call return a 403 error after successful authentication?

A 403 error after successful Google API authentication indicates a permission or scope issue. You must validate API enablement in your project, verify scope minimization settings, and ensure the service account has resource-level access to perform the requested operation.

How do I authenticate backend jobs to Google APIs using a Service Account?

Authenticate backend jobs using a Service Account JWT bearer by injecting a key.json file or environment secret. Ensure the required APIs are enabled and grant resource-level access, optionally using domain-wide delegation for organizational tasks.