mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 11:35:21 +08:00
oauth: Use custom http client so that --no-check-certificate is honored by oauth token fetch
Fixes #4085
This commit is contained in:
parent
32df634cb6
commit
45b63e2d45
|
@ -503,7 +503,8 @@ func doConfig(id, name string, m configmap.Mapper, oauthConfig *oauth2.Config, o
|
|||
}
|
||||
|
||||
// Exchange the code for a token
|
||||
token, err := oauthConfig.Exchange(context.Background(), auth.Code)
|
||||
ctx := Context(fshttp.NewClient(fs.Config))
|
||||
token, err := oauthConfig.Exchange(ctx, auth.Code)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to get token")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user