当我尝试使用Google.Apis.Auth.OAuth2
我给它提供了一个密匙登录,
json:
tell application "System Events"
tell application "Authy Desktop" to activate
keystroke "google"
delay 1
tell process "Authy Desktop"
tell window 1
click {700,200}
end tell
end tell
end tell
,然后成功登录后,它请求使用我的Gmail帐户登录 我可以使用令牌长达6个小时:
json:
"installed": {
"client_id": "ClientId",
"project_id": "project_id",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_secret": "client_secret",
"redirect_uris": [ "urn:ietf:wg:oauth:2.0:oob", "http://localhost" ]
但我希望它是自动的,无需登录帐户,
我该怎么办?
我不在乎凭据是否是代码中的纯文本(只是测试)。