From 5023050d954395969755387c6ff5a12bd7e51625 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 8 Nov 2015 15:29:19 +0000 Subject: [PATCH] Add RedirectLocalhostURL for another form of redirect URL --- oauthutil/oauthutil.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/oauthutil/oauthutil.go b/oauthutil/oauthutil.go index 4bb5d699e..6684a5547 100644 --- a/oauthutil/oauthutil.go +++ b/oauthutil/oauthutil.go @@ -41,6 +41,9 @@ const ( // RedirectPublicURL is redirect to local webserver when active with public name RedirectPublicURL = "http://localhost.rclone.org:" + bindPort + "/" + + // RedirectLocalhostURL is redirect to local webserver when active with localhost + RedirectLocalhostURL = "http://localhost:" + bindPort + "/" ) // oldToken contains an end-user's tokens. @@ -196,7 +199,7 @@ func Config(name string, config *oauth2.Config) error { // Detect whether we should use internal web server useWebServer := false switch config.RedirectURL { - case RedirectURL, RedirectPublicURL: + case RedirectURL, RedirectPublicURL, RedirectLocalhostURL: useWebServer = true case TitleBarRedirectURL: fmt.Printf("Use auto config?\n")