Subject: | Google Drive broken (no refresh_token) |
Looks like Google is only returning a refresh_token if access_type=offline is included in the authorization code request. Documentation here:
https://developers.google.com/accounts/docs/OAuth2WebServer
Using Net::Google::Drive::Simple, my YAML contains "refresh_token: ~" and uploads fail with "Token refresh failed".
Adding access_type => 'offline' to $full_login_uri->query_form() in sub full_login_uri in OAuth::Cmdline (line 63) seems to fix the issue.
Not sure it works the same way for other OAuth services, however.
cheers,
Aldo