From a017ad6cc940e61f7a3e9252f527a3ceca2d56ab Mon Sep 17 00:00:00 2001 From: Peter van Gulik Date: Fri, 4 Aug 2023 21:52:57 +0200 Subject: [PATCH] fix: access token is not updated on refresh on SFDX store due to syntax mismatch --- .../src/connection/providers/sfdxConnectionProvider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/salesforce/src/connection/providers/sfdxConnectionProvider.ts b/packages/salesforce/src/connection/providers/sfdxConnectionProvider.ts index 7456487f..9b1cbec7 100644 --- a/packages/salesforce/src/connection/providers/sfdxConnectionProvider.ts +++ b/packages/salesforce/src/connection/providers/sfdxConnectionProvider.ts @@ -24,8 +24,8 @@ export class SfdxConnectionProvider extends SalesforceConnectionProvider { const conn = await this.jsforceProvider.getJsForceConnection(); if (conn[refreshListenerSymbol] !== true) { conn[refreshListenerSymbol] = true; - conn.on('refresh', (accessToken) => { - sfdx.updateTokens(this.usernameOrAlias, accessToken) + conn.on('refresh', (accessToken: string) => { + sfdx.updateTokens(this.usernameOrAlias, { accessToken }) .then(() => this.logger.verbose(`Updated SFDX access token for user ${this.usernameOrAlias}`)) .catch((err) => this.logger.warn(`Unable store updated SFDX access token ${this.usernameOrAlias}`, err)); });