mirror of
https://github.com/rclone/rclone.git
synced 2025-01-22 21:35:15 +08: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
5f70918e2c
commit
bfb7b88371
|
@ -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…
Reference in New Issue
Block a user