From 45cf2ab128a135889215f72935947a94182f37f6 Mon Sep 17 00:00:00 2001 From: Lorenzo Pistone Date: Thu, 5 Dec 2024 16:22:12 +0100 Subject: [PATCH] Request the correct OAuth scopes when using service account keys. Fixes #101 . --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.go b/server.go index 66ae59a..dabfb73 100644 --- a/server.go +++ b/server.go @@ -79,7 +79,7 @@ func watchNamespaces() error { // grab credentials from where GCP would normally look ctx := context.Background() - creds, err := google.FindDefaultCredentials(ctx) + creds, err := google.FindDefaultCredentials(ctx, "https://www.googleapis.com/auth/cloud-platform") if err != nil { return fmt.Errorf("finding default credentials: %v", err) }