Skip to content

Commit 0cf0bfb

Browse files
author
waleed
committed
reduce scopes of salesforce oauth
1 parent aeb1236 commit 0cf0bfb

4 files changed

Lines changed: 3 additions & 4 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/credential-selector/components/oauth-required-modal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ const SCOPE_DESCRIPTIONS: Record<string, string> = {
213213
'crm.lists.write': 'Create and update HubSpot lists',
214214
tickets: 'Manage HubSpot tickets',
215215
api: 'Access Salesforce API',
216-
full: 'Full access to your Salesforce data',
217216
refresh_token: 'Maintain long-term access to your Salesforce account',
218217
default: 'Access your Asana workspace',
219218
base: 'Basic access to your Pipedrive account',

apps/sim/blocks/blocks/salesforce.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const SalesforceBlock: BlockConfig<SalesforceResponse> = {
5353
type: 'oauth-input',
5454
provider: 'salesforce',
5555
serviceId: 'salesforce',
56-
requiredScopes: ['api', 'full', 'openid', 'refresh_token', 'offline_access'],
56+
requiredScopes: ['api', 'refresh_token', 'openid'],
5757
placeholder: 'Select Salesforce account',
5858
required: true,
5959
},

apps/sim/lib/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ export const auth = betterAuth({
832832
authorizationUrl: 'https://login.salesforce.com/services/oauth2/authorize',
833833
tokenUrl: 'https://login.salesforce.com/services/oauth2/token',
834834
userInfoUrl: 'https://login.salesforce.com/services/oauth2/userinfo',
835-
scopes: ['api', 'full', 'openid', 'refresh_token', 'offline_access'],
835+
scopes: ['api', 'refresh_token', 'openid'],
836836
pkce: true,
837837
prompt: 'consent',
838838
redirectURI: `${getBaseUrl()}/api/auth/oauth2/callback/salesforce`,

apps/sim/lib/oauth/oauth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ export const OAUTH_PROVIDERS: Record<string, OAuthProviderConfig> = {
752752
providerId: 'salesforce',
753753
icon: (props) => SalesforceIcon(props),
754754
baseProviderIcon: (props) => SalesforceIcon(props),
755-
scopes: ['api', 'full', 'openid', 'refresh_token', 'offline_access'],
755+
scopes: ['api', 'refresh_token', 'openid'],
756756
},
757757
},
758758
defaultService: 'salesforce',

0 commit comments

Comments
 (0)