-
Notifications
You must be signed in to change notification settings - Fork 349
Open
Labels
Description
yvesjunqueira@Yvess-MacBook-Pro:~/src/github.com/googleworkspace/cli$ gws auth login
Open this URL in your browser to authenticate:
https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/drive%20https://www.googleapis.com/auth/spreadsheets%20https://www.googleapis.com/auth/gmail.modify%20https://www.googleapis.com/auth/calendar%20https://www.googleapis.com/auth/documents%20https://www.googleapis.com/auth/presentations%20https://www.googleapis.com/auth/tasks%20https://www.googleapis.com/auth/pubsub%20https://www.googleapis.com/auth/cloud-platform&access_type=offline&redirect_uri=http://localhost:54067&response_type=code&client_id=1REMOVED.apps.googleusercontent.com&prompt=select_account+consent
{
"account": "(unknown)",
"credentials_file": "/Users/yvesjunqueira/.config/gws/credentials.enc",
"encryption": "AES-256-GCM (key secured by OS Keyring or local `.encryption_key`)",
"message": "Authentication successful. Encrypted credentials saved.",
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/documents",
"https://www.googleapis.com/auth/presentations",
"https://www.googleapis.com/auth/tasks",
"https://www.googleapis.com/auth/pubsub",
"https://www.googleapis.com/auth/cloud-platform"
],
"status": "success"
}
yvesjunqueira@Yvess-MacBook-Pro:~/src/github.com/googleworkspace/cli$ gws gmail +triage --max 5 --query 'from:email@example.com:anywhere'
{
"error": {
"code": 401,
"message": "Gmail auth failed: Legacy credentials found at /Users/yvesjunqueira/.config/gws/credentials.enc. gws now supports multiple accounts. Please run 'gws auth login' to upgrade your credentials.",
"reason": "authError"
}
}
also:
vesjunqueira@Yvess-MacBook-Pro:~/src/github.com/googleworkspace/cli$ gws auth status
{
"auth_method": "oauth2",
"client_config": "/Users/yvesjunqueira/.config/gws/client_secret.json",
"client_config_exists": true,
"client_id": "19480478....com",
"config_client_id": "19480478....com",
"credential_source": "client_secret.json",
"enabled_api_count": 22,
"enabled_apis": [
"analyticshub.googleapis.com",
"bigquery.googleapis.com",
"bigqueryconnection.googleapis.com",
"bigquerydatapolicy.googleapis.com",
"bigquerydatatransfer.googleapis.com",
"bigquerymigration.googleapis.com",
"bigqueryreservation.googleapis.com",
"bigquerystorage.googleapis.com",
"cloudapis.googleapis.com",
"cloudtrace.googleapis.com",
"dataform.googleapis.com",
"dataplex.googleapis.com",
"datastore.googleapis.com",
"googleads.googleapis.com",
"logging.googleapis.com",
"monitoring.googleapis.com",
"servicemanagement.googleapis.com",
"serviceusage.googleapis.com",
"sql-component.googleapis.com",
"storage-api.googleapis.com",
"storage-component.googleapis.com",
"storage.googleapis.com"
],
"encrypted_credentials": "/Users/yvesjunqueira/.config/gws/credentials.enc",
"encrypted_credentials_exists": true,
"encryption_valid": true,
"has_refresh_token": true,
"plain_credentials": "/Users/yvesjunqueira/.config/gws/credentials.json",
"plain_credentials_exists": false,
"project_id": "pipeboard-gads",
"scope_count": 9,
"scopes": [
"https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/documents",
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/presentations",
"https://www.googleapis.com/auth/pubsub",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/tasks"
],
"storage": "encrypted",
"token_cache_exists": false,
"token_valid": true
}
gws auth login has no effect for future gmail calls.
Reactions are currently unavailable