Skip Menu |

This queue is for tickets about the OAuth-Cmdline CPAN distribution.

Report information
The Basics
Id: 99372
Status: resolved
Priority: 0/
Queue: OAuth-Cmdline

People
Owner: Nobody in particular
Requestors: dada [...] perl.it
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.03
Fixed in: 0.04



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
Interestingly enough, this has been reported by Kevin Ashcraft before, and after we investigated, the problem went away. It seems like Google's servers require this occasionally, so I went ahead today and added it in the two affected modules OAuth::Cmdline and Net::Google::Drive::Simple: https://github.com/mschilli/oauth-cmdline/commit/c4ff91705656940c331849c11d412fb8889f5a0a https://github.com/mschilli/net-google-drive-simple/commit/01d5be016e26f59128f6eb5a1e2f5afdd4d2cc69 I've released OAuth::Cmdline 0.04 and Net::Google::Drive::Simple 0.11 to CPAN, respectively. Please give it a whirl and let me know if it fixes the problem on your end, because it works fine in my environment either way.
Problem is fixed, thank you very much. cheers, Aldo