Skip to content

Commit 3f2a6ea

Browse files
committed
fix(salesforce): honor runtime-config baseURL when deriving default endpoints
1 parent 10088bc commit 3f2a6ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/runtime/server/lib/oauth/salesforce.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function defineOAuthSalesforceEventHandler({
6363
}: OAuthConfig<OAuthSalesforceConfig>) {
6464
return eventHandler(async (event: H3Event) => {
6565
const runtimeConfig = useRuntimeConfig(event).oauth?.salesforce
66-
const baseURL = config?.baseURL || 'https://login.salesforce.com'
66+
const baseURL = config?.baseURL || runtimeConfig?.baseURL || 'https://login.salesforce.com'
6767
config = defu(config, runtimeConfig, {
6868
authorizationURL: `${baseURL}/services/oauth2/authorize`,
6969
tokenURL: `${baseURL}/services/oauth2/token`,

0 commit comments

Comments
 (0)