diff --git a/internal/api/handlers/management/auth_files.go b/internal/api/handlers/management/auth_files.go index 285b3ae29..57aa89858 100644 --- a/internal/api/handlers/management/auth_files.go +++ b/internal/api/handlers/management/auth_files.go @@ -2052,7 +2052,7 @@ func (h *Handler) RequestAntigravityToken(c *gin.Context) { log.Warnf("antigravity: failed to fetch project ID: %v", errProject) } else { projectID = fetchedProjectID - log.Infof("antigravity: obtained project ID %s", projectID) + log.Infof("antigravity: obtained project ID %s", util.HideAPIKey(projectID)) } } @@ -2096,7 +2096,7 @@ func (h *Handler) RequestAntigravityToken(c *gin.Context) { CompleteOAuthSessionsByProvider("antigravity") fmt.Printf("Authentication successful! Token saved to %s\n", savedPath) if projectID != "" { - fmt.Printf("Using GCP project: %s\n", projectID) + fmt.Printf("Using GCP project: %s\n", util.HideAPIKey(projectID)) } fmt.Println("You can now use Antigravity services through this CLI") }() diff --git a/internal/auth/antigravity/auth.go b/internal/auth/antigravity/auth.go index 665047f9f..46e62f367 100644 --- a/internal/auth/antigravity/auth.go +++ b/internal/auth/antigravity/auth.go @@ -351,7 +351,7 @@ func (o *AntigravityAuth) OnboardUser(ctx context.Context, accessToken, tierID s } if projectID != "" { - log.Infof("Successfully fetched project_id: %s", projectID) + log.Infof("Successfully fetched project_id: %s", util.HideAPIKey(projectID)) return projectID, nil } diff --git a/sdk/auth/antigravity.go b/sdk/auth/antigravity.go index 8660f29d1..53a6f1430 100644 --- a/sdk/auth/antigravity.go +++ b/sdk/auth/antigravity.go @@ -180,7 +180,7 @@ waitForCallback: return nil, fmt.Errorf("antigravity: failed to fetch project ID: %w", errProject) } else { projectID = fetchedProjectID - log.Infof("antigravity: obtained project ID %s", projectID) + log.Infof("antigravity: obtained project ID %s", util.HideAPIKey(projectID)) } } if strings.TrimSpace(projectID) == "" { @@ -211,7 +211,7 @@ waitForCallback: fmt.Println("Antigravity authentication successful") if projectID != "" { - fmt.Printf("Using GCP project: %s\n", projectID) + fmt.Printf("Using GCP project: %s\n", util.HideAPIKey(projectID)) } return &coreauth.Auth{ ID: fileName,