mirror of
https://github.com/rclone/rclone.git
synced 2025-08-12 15:07:24 +02:00
oauth: Allow auth_url and token_url to be set in the config file
If set in the config file, these override the ones configured into the remote. This enables alternative oauth servers to be used for all oauth remotes. This can only be altered by editing the config file for the moment.
This commit is contained in:
@ -209,6 +209,16 @@ func overrideCredentials(name string, origConfig *oauth2.Config) (config *oauth2
|
||||
config.ClientSecret = ClientSecret
|
||||
changed = true
|
||||
}
|
||||
AuthURL := fs.ConfigFileGet(name, fs.ConfigAuthURL)
|
||||
if AuthURL != "" {
|
||||
config.Endpoint.AuthURL = AuthURL
|
||||
changed = true
|
||||
}
|
||||
TokenURL := fs.ConfigFileGet(name, fs.ConfigTokenURL)
|
||||
if TokenURL != "" {
|
||||
config.Endpoint.TokenURL = TokenURL
|
||||
changed = true
|
||||
}
|
||||
return config, changed
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user