mirror of
https://github.com/rclone/rclone.git
synced 2025-02-02 11:39:33 +01:00
oauthutil: fix headless config for drive and gcs - fixes #158
This commit is contained in:
parent
177dbbc29a
commit
2e9f2ea3d3
@ -197,11 +197,13 @@ func Config(name string, config *oauth2.Config) error {
|
|||||||
fmt.Printf(" * Say Y if not sure\n")
|
fmt.Printf(" * Say Y if not sure\n")
|
||||||
fmt.Printf(" * Say N if you are working on a remote or headless machine or Y didn't work\n")
|
fmt.Printf(" * Say N if you are working on a remote or headless machine or Y didn't work\n")
|
||||||
useWebServer = fs.Confirm()
|
useWebServer = fs.Confirm()
|
||||||
|
if useWebServer {
|
||||||
// copy the config and set to use the internal webserver
|
// copy the config and set to use the internal webserver
|
||||||
configCopy := *config
|
configCopy := *config
|
||||||
config = &configCopy
|
config = &configCopy
|
||||||
config.RedirectURL = RedirectURL
|
config.RedirectURL = RedirectURL
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Make random state
|
// Make random state
|
||||||
stateBytes := make([]byte, 16)
|
stateBytes := make([]byte, 16)
|
||||||
|
Loading…
Reference in New Issue
Block a user