From acc6b0496f397f197cc3758fff0d6bc57135cb4f Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Wed, 23 Dec 2020 06:48:53 -0500 Subject: [PATCH] :bug: Add scopes and offline access to Dropbox OAuth2 credentials (#1246) --- .../credentials/DropboxOAuth2Api.credentials.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/credentials/DropboxOAuth2Api.credentials.ts b/packages/nodes-base/credentials/DropboxOAuth2Api.credentials.ts index 11e290bd8..c3c9f248d 100644 --- a/packages/nodes-base/credentials/DropboxOAuth2Api.credentials.ts +++ b/packages/nodes-base/credentials/DropboxOAuth2Api.credentials.ts @@ -3,6 +3,11 @@ import { NodePropertyTypes, } from 'n8n-workflow'; +const scopes = [ + 'files.content.write', + 'files.content.read', + 'sharing.read', +]; export class DropboxOAuth2Api implements ICredentialType { name = 'dropboxOAuth2Api'; @@ -30,13 +35,13 @@ export class DropboxOAuth2Api implements ICredentialType { displayName: 'Scope', name: 'scope', type: 'hidden' as NodePropertyTypes, - default: '', + default: scopes.join(' '), }, { displayName: 'Auth URI Query Parameters', name: 'authQueryParameters', type: 'hidden' as NodePropertyTypes, - default: '', + default: 'token_access_type=offline', }, { displayName: 'Authentication',