From e62d2fd309e666b278fb3e2326c226581aa9d1a1 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 13 May 2018 17:28:09 +0100 Subject: [PATCH] oauthutil: Fix custom redirect URL message - fixes #2306 --- lib/oauthutil/oauthutil.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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