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

oauthutil: Fix custom redirect URL message - fixes #2306

Nick Craig-Woode62d2fd309e6
diff --git a/lib/oauthutil/oauthutil.go b/lib/oauthutil/oauthutil.go
index 1c4d926c9..23c286683 100644
--- a/lib/oauthutil/oauthutil.go
+++ b/lib/oauthutil/oauthutil.go
@@ -275,10 +275,6 @@ func doConfig(id, name string, oauthConfig *oauth2.Config, offline bool, opts []
oauthConfig, changed := overrideCredentials(name, oauthConfig)
automatic := config.FileGet(name, config.ConfigAutomatic) != ""
- if changed {
- fmt.Printf("Make sure your Redirect URL is set to %q in your custom config.\n", RedirectURL)
- }
-
// See if already have a token
tokenString := config.FileGet(name, "token")
if tokenString != "" {
@@ -292,6 +288,9 @@ func doConfig(id, name string, oauthConfig *oauth2.Config, offline bool, opts []
useWebServer := false
switch oauthConfig.RedirectURL {
case RedirectURL, RedirectPublicURL, RedirectLocalhostURL:
+ if changed {
+ fmt.Printf("Make sure your Redirect URL is set to %q in your custom config.\n", oauthConfig.RedirectURL)
+ }
useWebServer = true
if automatic {
break