dropbox: enable short lived access tokens #4792
Starting September 30th, 2021, the Dropbox OAuth flow will no longer return long-lived access tokens. It will instead return short-lived access tokens, and optionally return refresh tokens. This patch adds the token_access_type=offline parameter which causes dropbox to return short lived tokens now.
This commit is contained in:
parent
ce7cdadb71
commit
e073720a8f
1 changed files with 3 additions and 0 deletions
|
@ -125,6 +125,9 @@ func init() {
|
|||
Config: func(ctx context.Context, name string, m configmap.Mapper) {
|
||||
opt := oauthutil.Options{
|
||||
NoOffline: true,
|
||||
OAuth2Opts: []oauth2.AuthCodeOption{
|
||||
oauth2.SetAuthURLParam("token_access_type", "offline"),
|
||||
},
|
||||
}
|
||||
err := oauthutil.Config(ctx, "dropbox", name, m, dropboxConfig, &opt)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue