mirror of
https://github.com/rclone/rclone
synced 2024-12-23 14:23:44 +01:00
oauthutil: Fix custom redirect URL message - fixes #2306
This commit is contained in:
parent
e56be0dfd8
commit
e62d2fd309
@ -275,10 +275,6 @@ func doConfig(id, name string, oauthConfig *oauth2.Config, offline bool, opts []
|
|||||||
oauthConfig, changed := overrideCredentials(name, oauthConfig)
|
oauthConfig, changed := overrideCredentials(name, oauthConfig)
|
||||||
automatic := config.FileGet(name, config.ConfigAutomatic) != ""
|
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
|
// See if already have a token
|
||||||
tokenString := config.FileGet(name, "token")
|
tokenString := config.FileGet(name, "token")
|
||||||
if tokenString != "" {
|
if tokenString != "" {
|
||||||
@ -292,6 +288,9 @@ func doConfig(id, name string, oauthConfig *oauth2.Config, offline bool, opts []
|
|||||||
useWebServer := false
|
useWebServer := false
|
||||||
switch oauthConfig.RedirectURL {
|
switch oauthConfig.RedirectURL {
|
||||||
case RedirectURL, RedirectPublicURL, RedirectLocalhostURL:
|
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
|
useWebServer = true
|
||||||
if automatic {
|
if automatic {
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user