mirror of
https://github.com/rclone/rclone.git
synced 2025-01-24 12:56:36 +02:00
lib/oauthutil: don't require token to exist for client credentials flow
Before this change when setting up client credentials flow manually, rclone would fail with this error message on first run despite the fact that no existing token is needed. empty token found - please run "rclone config reconnect remote:" This fixes the problem by ignoring token loading problems for client credentials flow.
This commit is contained in:
parent
85ba5b896b
commit
57aebbc1af
@ -480,7 +480,7 @@ func OverrideCredentials(name string, m configmap.Mapper, origConfig *Config) (n
|
||||
func NewClientWithBaseClient(ctx context.Context, name string, m configmap.Mapper, config *Config, baseClient *http.Client) (*http.Client, *TokenSource, error) {
|
||||
config, _ = OverrideCredentials(name, m, config)
|
||||
token, err := GetToken(name, m)
|
||||
if err != nil {
|
||||
if err != nil && !config.ClientCredentialFlow {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user