diff --git a/cmd/picoclaw/cmd_auth.go b/cmd/picoclaw/cmd_auth.go index 729c56177..e33d07b53 100644 --- a/cmd/picoclaw/cmd_auth.go +++ b/cmd/picoclaw/cmd_auth.go @@ -424,6 +424,20 @@ func authStatusCmd() { fmt.Printf(" %s:\n", provider) fmt.Printf(" Method: %s\n", cred.AuthMethod) fmt.Printf(" Status: %s\n", status) + + if cred.AuthMethod == "oauth" { + var scopes string + switch provider { + case "openai": + scopes = auth.OpenAIOAuthConfig().Scopes + case "google-antigravity", "antigravity": + scopes = auth.GoogleAntigravityOAuthConfig().Scopes + } + if scopes != "" { + fmt.Printf(" Scopes: %s\n", scopes) + } + } + if cred.AccountID != "" { fmt.Printf(" Account: %s\n", cred.AccountID) } diff --git a/pkg/auth/oauth.go b/pkg/auth/oauth.go index cf8c1c9c4..f1510a0f6 100644 --- a/pkg/auth/oauth.go +++ b/pkg/auth/oauth.go @@ -330,7 +330,9 @@ func RefreshAccessToken(cred *AuthCredential, cfg OAuthProviderConfig) (*AuthCre "client_id": {cfg.ClientID}, "grant_type": {"refresh_token"}, "refresh_token": {cred.RefreshToken}, - "scope": {"openid profile email"}, + } + if cfg.Scopes != "" { + data.Set("scope", cfg.Scopes) } if cfg.ClientSecret != "" { data.Set("client_secret", cfg.ClientSecret)