Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

Obtain a refresh token for GCD

Steven Luc59a292719ad
diff --git a/oauthutil/oauthutil.go b/oauthutil/oauthutil.go
index edff202d8..dfd235aa5 100644
--- a/oauthutil/oauthutil.go
+++ b/oauthutil/oauthutil.go
@@ -312,7 +312,7 @@ func Config(id, name string, config *oauth2.Config) error {
return err
}
state := fmt.Sprintf("%x", stateBytes)
- authURL := config.AuthCodeURL(state)
+ authURL := config.AuthCodeURL(state, oauth2.AccessTypeOffline)
// Prepare webserver
server := authServer{