[fix] fix antigravity oauth scopes
This commit is contained in:
parent
80c8b57533
commit
44b418c771
2 changed files with 17 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue