From e073720a8fed5f2286f933ee166aca916dbe1d07 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 23 Nov 2020 10:38:52 +0000 Subject: [PATCH] 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. --- backend/dropbox/dropbox.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/dropbox/dropbox.go b/backend/dropbox/dropbox.go index 350b2d4e0..4b29f5792 100755 --- a/backend/dropbox/dropbox.go +++ b/backend/dropbox/dropbox.go @@ -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 {