Skip to content

Commit 7a41917

Browse files
author
aadamgough
committed
removed fallback logic
1 parent 962b480 commit 7a41917

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

apps/sim/lib/auth/auth.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,7 @@ export const auth = betterAuth({
140140
const match = data.profile.match(/^(https:\/\/[^/]+)/)
141141
if (match && match[1] !== 'https://login.salesforce.com') {
142142
const instanceUrl = match[1]
143-
const existingScope =
144-
account.scope || 'api refresh_token openid offline_access'
145-
scopeToStore = `__sf_instance__:${instanceUrl} ${existingScope}`
143+
scopeToStore = `__sf_instance__:${instanceUrl} ${account.scope}`
146144
}
147145
}
148146
}
@@ -199,9 +197,7 @@ export const auth = betterAuth({
199197
const match = data.profile.match(/^(https:\/\/[^/]+)/)
200198
if (match && match[1] !== 'https://login.salesforce.com') {
201199
const instanceUrl = match[1]
202-
const existingScope =
203-
account.scope || 'api refresh_token openid offline_access'
204-
updates.scope = `__sf_instance__:${instanceUrl} ${existingScope}`
200+
updates.scope = `__sf_instance__:${instanceUrl} ${account.scope}`
205201
}
206202
}
207203
}

0 commit comments

Comments
 (0)