dropbox: add scopes to oauth request and optionally "members.read"

This change adds the scopes rclone wants during the oauth request.
Previously rclone left these blank to get a default set.

This allows rclone to add the "members.read" scope which is necessary
for "impersonate" to work, but only when it is in use as it require
authorisation from a Team Admin.

See: https://forum.rclone.org/t/dropbox-no-members-read/22223/3
This commit is contained in:
Nick Craig-Wood 2021-02-11 16:29:52 +00:00
parent 2cdc071b85
commit 37e630178e
2 changed files with 41 additions and 5 deletions

View file

@ -639,6 +639,7 @@ func (s *authServer) Init() error {
http.Error(w, "State did not match - please try again", http.StatusForbidden)
return
}
fs.Debugf(nil, "Redirecting browser to: %s", s.authURL)
http.Redirect(w, req, s.authURL, http.StatusTemporaryRedirect)
return
})